Στις 6/9/2013 7:48 πμ, ο/η Piet van Oostrum έγραψε:
hotmail.com. Register this as one of your email addresses in
   gmail. For this it must be a real email address that belongs to you,
   not a fake address. When it is registered with gmail, gmail will not
   change it if found in a From header.

Hello Piet,

I'am not sure what you mean by registering a mail address with GMail.
Do you mean to add more that one mail account addresses within my GMail account?

If you mean that i must tell you that in the pop settinsg inside my gmail.com account i use ni...@superhost.gr and ni...@ath.forthnet.gr as other sending nad retrival mail accounts.

Is this what you mean?


So the code becomes something like:
MESSAGE = "From: \"{0}\" <ni...@hotmail.com>\r\n" "Reply-To: {0}\r\n" "To: {1}\r\n" 
"Subject: (From {0}) {2}\r\n\r\n{3}\r\n".format(FROM, TO, SUBJECT, MESSAGE)

If you mean the above then i just have tried, but still not mail gets send.


MESSAGE = "From: \"{0}\" <ni...@ath.forthnet.gr>\r\n" "Reply-To: {0}\r\n" "To: {1}\r\n" "Subject: (From {0}) {2}\r\n\r\n{3}\r\n".format( FROM, TO, SUBJECT, MESSAGE )
MESSAGE = MESSAGE.encode('utf-8')
                
# open Gmail's SMTP server
server = smtplib.SMTP('smtp.gmail.com:587')
server.ehlo()
server.starttls()

# next, log in to the server
server.login("my_perso...@gmail.com", "my_password")


Please elaborate further, thank you.

--
Webhost <http://superhost.gr>
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to