On Thu, Feb 11, 2010 at 3:13 PM, Grigor Kolev <[email protected]> wrote: > Hi. > I try send a mail with smtplib > Server work with postfix. > I try it > ------------------------------------------------ > import smtplib > s=smtplib.SMTP("localhost") > tolist=['[email protected]'] > msg = '''\ > From: [email protected] > Subject: testin' > This is a test ''' > s.sendmail("t...@local", tolist, msg) > ------------------------------------------------- > How can i send the file?
I think you need the To: header in the msg, and possibly a blank line after the headers. See the example here: http://docs.python.org/library/smtplib.html#smtp-example Kent _______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
