Max M wrote: > sridhar wrote: > >>iam having user account on an exchangeserver. >>with that can i send an email using python? >> >>if iam using the following code iam getting error >> >> >>fromAddress = '[EMAIL PROTECTED]' >>toAddress = '[EMAIL PROTECTED]' >>msg = "Subject: Hello\n\nThis is the body of the message." >>import smtplib >>server = smtplib.SMTP("hstmsg002",25) >>server.sendmail(fromAddress, toAddress, msg) > > > > Do yourself a favor and use the email module to construct your messages > with. Constructing messages by hand can lead you into so many traps. > Especially if you are using international characters in you messages. > > Good advice. However, since the error is occurring in the SMTP() call a malformed message is clearly not the cause of this particular problem.
regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://holdenweb.blogspot.com Recent Ramblings http://del.icio.us/steve.holden -- http://mail.python.org/mailman/listinfo/python-list