Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TEST SITE: notification mails recieved with no expeditor #219

Open
elizabetharnaud opened this issue Nov 30, 2023 · 3 comments
Open

TEST SITE: notification mails recieved with no expeditor #219

elizabetharnaud opened this issue Nov 30, 2023 · 3 comments

Comments

@elizabetharnaud
Copy link
Member

Capture d’écran 2023-11-30 à 17 52 16
@qlands
Copy link
Contributor

qlands commented Jan 24, 2024

Question to chat GPT: "I am working with python and smtp lib. When I send an email the receiver gets it with the following information: no expeditor. How can I correct such issue?"

From Chat GPT: "It seems like the issue you're facing is related to the sender information not being properly set in your email. When using the smtplib library in Python, you need to specify the sender's email address in the From field. Here's an example of how you can set the sender information:"

import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart

# Sender and recipient email addresses
sender_email = '[email protected]'
recipient_email = '[email protected]'

# Create the MIME object
message = MIMEMultipart()
message['From'] = sender_email
message['To'] = recipient_email
message['Subject'] = 'Your subject'

# Add your email content
body = 'Your email body goes here.'
message.attach(MIMEText(body, 'plain'))

# SMTP setup
smtp_server = 'your_smtp_server'
smtp_port = 587

# Start the SMTP session
with smtplib.SMTP(smtp_server, smtp_port) as server:
    # Login to your email account if needed
    # server.login(sender_email, 'your_password') 

    # Send the email
    server.sendmail(sender_email, recipient_email, message.as_string())

@acoto can you check the code to see if you have indicated the from properly?

@acoto
Copy link
Collaborator

acoto commented Jan 24, 2024 via email

@acoto
Copy link
Collaborator

acoto commented Jan 24, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants