Hi There,
We have some processes that execute python scripts overnight.
At the end of the process and automated email is sent. We recently had to move to our ISP's SMTP server.
Now, emails seem to appear before the scheduled task runs!
I just ran the following as a test at exactly 3PM and it appeared in my inbox almost immediately but it showed the time sent as 2:54PM.
Is the time sent controlled by the mail server or does anyone have any idea what could cause the apparent difference?
Thanks for any advice.
Peter.
Remember- It's nice to be important,
but it's important to be nice
We have some processes that execute python scripts overnight.
At the end of the process and automated email is sent. We recently had to move to our ISP's SMTP server.
Now, emails seem to appear before the scheduled task runs!
I just ran the following as a test at exactly 3PM and it appeared in my inbox almost immediately but it showed the time sent as 2:54PM.
Code:
import smtplib
email_to = "xxx@xxxxxxxxxxxxxx.com.au"
email_from = "it@xxxxxxxxxxxxxxxx.com.au"
password = 'xxxxxxxxxxxxxx'
smtpserver = "smpt.server.address"
emsg = "Should have the time sent."
session = smtplib.SMTP(smtpserver)
session.login(email_from,password)
smtpresult = session.sendmail(email_from, email_to, emsg)
session.quit()
Is the time sent controlled by the mail server or does anyone have any idea what could cause the apparent difference?
Thanks for any advice.
Peter.
Remember- It's nice to be important,
but it's important to be nice