bioversity / Crop-Ontology

An ontology database for crops' traits with their variables
http://www.cropontology.org/
GNU Affero General Public License v3.0
20 stars 8 forks source link

TEST SITE: notification mails recieved with no expeditor #219

Open elizabetharnaud opened 9 months ago

elizabetharnaud commented 9 months ago
Capture d’écran 2023-11-30 à 17 52 16
qlands commented 7 months ago

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 = 'your_email@example.com'
recipient_email = 'recipient_email@example.com'

# 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 commented 7 months ago

Hi Carlos,

We have a very similar code into the repo, The issue of the emails is caused from the google workspace side and the non-whitelisted domain. This is not a problem of the code.

Look at this settings: https://knowledge.workspace.google.com/kb/emails-getting-moved-to-spam-by-imap-connection-000002651

Allan

El mié, 24 ene 2024 a las 8:32, QLands @.***>) escribió:

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 = @.' recipient_email = @.'

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 https://github.com/acoto can you check the code to see if you have indicated the from properly?

— Reply to this email directly, view it on GitHub https://github.com/bioversity/Crop-Ontology/issues/219#issuecomment-1908251031, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD7OU3W42VO6ZK63JJEYVSDYQELQXAVCNFSM6AAAAABABQIORCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBYGI2TCMBTGE . You are receiving this because you were mentioned.Message ID: @.***>

acoto commented 7 months ago

Carlos,

A configuration like this should be included into the domain for validate de sender, look at this post:

https://tesel.mx/solucionar-error-gmail-no-pudo-verificar-que-realmente-envio-este-mensaje-5062/

Allan

El mié, 24 ene 2024 a las 8:39, Allan Coto @.***>) escribió:

Hi Carlos,

We have a very similar code into the repo, The issue of the emails is caused from the google workspace side and the non-whitelisted domain. This is not a problem of the code.

Look at this settings: https://knowledge.workspace.google.com/kb/emails-getting-moved-to-spam-by-imap-connection-000002651

Allan

El mié, 24 ene 2024 a las 8:32, QLands @.***>) escribió:

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 = @.' recipient_email = @.'

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 https://github.com/acoto can you check the code to see if you have indicated the from properly?

— Reply to this email directly, view it on GitHub https://github.com/bioversity/Crop-Ontology/issues/219#issuecomment-1908251031, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD7OU3W42VO6ZK63JJEYVSDYQELQXAVCNFSM6AAAAABABQIORCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBYGI2TCMBTGE . You are receiving this because you were mentioned.Message ID: @.***>