smtplib - missing message

alastair ally_burnett at yahoo.co.uk
Fri May 14 08:40:53 EDT 2004


Hi,

I'm trying to send an email using smtplib and a Yahoo smtp server. 
I've read that this uses authentication, so in order to use
'smtp.mail.yahoo.com' as the host, I use the login() method, and this
works fine (ie I login ok) . When I look at the received mail, the
text I send is not there - does anyone know why this is the case ?

Here's the code I've been using:

import smtplib

server = smtplib.SMTP("smtp.mail.yahoo.com")
server.debuglevel = 25
server.login("myusername", "mypassword")

fromClause = "me at me.com"
toClause = "you at yahoo.co.uk"

msg = "Please display me."

server.sendmail(fromClause, toClause, msg)

server.quit()

Regards,

Alastair.



More information about the Python-list mailing list