[HELP] SMTPlib not sending my mail

ashok.raavi ashok.raavi at gmail.com
Tue Jan 29 03:24:45 EST 2008


Hi,

I am also facing the same problem, smtplib used to send mail a while
back but it stopped sending mails.

when i run this in interpreter
>>> import smtplib
>>> s = smtplib.SMTP("localhost")
>>> s.sendmail(from, to, "message")
{}
>>>

though it is not giving any error, it is not sending mail.

Any help is appreciated.

ornto wrote:
> Hi, I'm trying to create an application which checks a
> dynamic web site and on certain events sends an email to me.
> My problem though is with the email task. By now I made this
>   simple test code:
>
> #prova invio email
> smtpserver = smtplib.SMTP(mailserver)
> messaggio= "Messaggio di prova"
> print mail
> print messaggio
> smtpresult=smtpserver.sendmail("Watcher",mail,messaggio)
> if smtpresult:
>      print smtpresult
> smtpserver.quit()
>
> "mailserver" and "mail" values are loaded from a ini file
> and they're correct.
> The call to smtpserver gives back no errors (smtpresult
> remains empty).
> The running enviroment gives no error.
> So, it looks like that the program works alloright, sending
> the mail- BUT, I receive no mail! I've tried to change the
> smtp server with another one which still works with my isp,
> with no luck. If I try a smtp which doesn't give me access,
> I correctly receive an error from the program.
> What might be the problem?



More information about the Python-list mailing list