473,320 Members | 1,858 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

[HELP] SMTPlib not sending my mail

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,mess aggio)
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?
Jan 21 '08 #1
2 1903

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,mess aggio)
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?
Jan 29 '08 #2
have you checked your mail server logs ?

tir, 29.01.2008 kl. 00.24 -0800, skrev ashok.raavi:
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,mess aggio)
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?
Jan 29 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: dccarson | last post by:
Here is a snippet of code which does not send to all recipients. However, it also does not inform me of this error. My suspicion is that this only fails for users with longer usernames. The two I...
0
by: praba kar | last post by:
Dear All, I have doubt regarding mail sending smtplib module. The below code is I used to send a mail. ########################################## import email.Message import email.Utils...
6
by: Matthias Kluwe | last post by:
Hi! After getting a @gmail.com address, I recognized I had to use TLS in my python scripts using smtplib in order to get mail to the smtp.gmail.com server. Things work well so far, apart from...
12
by: Chris Dewin | last post by:
Hi. I've been thinking about using smtplib to run a mailing list from my website. s = smtplib.SMTP("server") s.sendmail(fromaddress, toaddresess, msg) I know that in this instance, the...
5
by: tobiah | last post by:
In the example at: http://docs.python.org/lib/SMTP-example.html The text of the email message ends up with the From: and To: headers in it, and yet the call to sendmail() on the server object...
8
by: NicolasG | last post by:
I'm using the following code to send e-mail through python: import smtplib fromaddr = 'myMail@gmail.com' toaddrs = 'myOtherMail@gmail.com' subject = 'someting for subject !' msg = 'This...
0
by: Roger | last post by:
I am having a problem sending email through smtp.gmail.com using smtplib. Everything works and the mail is sent and received, except quit. The following shows the problem (without bothering to...
1
by: Benedict Verheyen | last post by:
Hi, i get an "Unable to relay for" when trying to send an email from within my network to an email address not on my domain. I don't understand why it says "relaying" as i'm sending from an...
1
by: Hunter | last post by:
I am writing a script that needs to send some emails. And I've used smtplib in the past and it is pretty easy. But I thought, gee it would be easier if I could just call it as a function, passing...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.