Hey,Can you get the following program to work?
Don't know if you can help, but I'm trying to import archived messages
from Thunderbird into my gmail account and keep getting these types of
errors. *I am using the GML program to help incorporate, but the SMTP
server is not being recognized by gmail. *Am I doing something wrong? *
Anything else I can try?
SMTP I've tried:
* * smtp.gmail.com
* * gsmtp56.google. com
Error Val : (530, '5.7.0 Must issue a STARTTLS command first.
m29sm9416768poh .4',
*** 76 ERROR SENDING MESSAGE FROM: r...@bassisload eddj.com
*** UNABLE TO CONNECT TO SERVER OR SEND MESSAGE. ERROR FOLLOWS.
Error Type: smtplib.SMTPSen derRefused
Error Val : (530, '5.7.0 Must issue a STARTTLS command first.
n22sm9448670pof .3', 'r...@bassisloa deddj.com')
Thanks,
Cher
#Uses gmail to send an email to someone
import smtplib
sender = "Tom"
to = "Sally"
subject = "Test smtplib"
headers = "From: %s\r\nTo: %s\r\nSubject: %s\r\n\r\n" % (sender, to,
subject)
msg = headers + "Hello. How are you?"
mailserver = smtplib.SMTP("s mtp.gmail.com", 587)
mailserver.ehlo ()
mailserver.star ttls()
mailserver.ehlo ()
mailserver.logi n("your_gmail_e mail_address", "your_gmail_pas sword")
mailserver.send mail("your_gmai l_email_addres" ,
"a_destination_ email_address", msg)
mailserver.clos e()