SMTP Sending Mail Problem

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Mon Jan 28 11:58:46 EST 2008


On 28 ene, 14:15, the_ricka <rick.arn... at gmail.com> wrote:

> However, whenever I try to read more than one line from the file, the
> email is not being delivered.  The only reason I know this is because
> I tried just reading in the first line of the text file, and the email
> sent fine.  Right now I believe this must have something to do with
> new line characters at the end of each line, but it doesn't quite make
> sense to me why this is a problem, as I have also used the same script
> and just created a string in it with multiple lines (\r\n) and sent it
> and the email sends fine.  To complicate the issue further, I have
> turned used the set_debuglevel method so I can see the output from the
> SMTP server, and it appears that the message was Queued for mail
> delivery.

Your code is fine, and the message was queued as you noticed. Maybe
the recipient has some sort of black list, didn't like the sender, the
message was classified as spam, or something like that. I'd look for
problems elsewhere, not in the code.

> send: 'From: #######@######.com\r\nTo: ######@######.com\r\nSubject:
> Test1\r\n\
> r\nThis is from the file\r\nThis concludes our test\r\n\r\n\r\n.\r\n'
> reply: '250 2.6.0 <############@###############.com> Qu
> eued mail for delivery\r\n'
> reply: retcode (250); Msg: 2.6.0 <##########@n#########.com> Queued
> mail for delivery
> data: (250, '2.6.0 <########@################.com> Q
> ueued mail for delivery')
> send: 'quit\r\n'
> reply: '221 2.0.0 ################.com Service closing transmission
> cha
> nnel\r\n'
> reply: retcode (221); Msg: 2.0.0 #################.com Service closing
> t
> ransmission channel

--
Gabriel Genellina



More information about the Python-list mailing list