smtplib question

gandalf gold gantgold at yahoo.com
Tue Jan 16 12:16:02 EST 2007


Hi everyone,

I was trying out smtplib and found out that I can email to anyone in my domain but not to an email address not in the domain. From browsing on the web, it seems that this has to do with the configuration of the mail server. The mail server in my organization is MS exchange. Obviously I can email to any email address from my MS outlook.

What's the easiest way to fix the program? 

Thanks.

- gan

import sys, smtplib
fr = "xxx at yyy.com"
to = "xxx at zzz.com" # will not work
line = "testing"
subj = "subject line"
msg = "From: %s\r\nTo: %s\r\nSubject: %s\r\n\r\n%s" % (fr, to, subj, line)
server = smtplib.SMTP("EXCHCLUSTER.ccis.edu")
server.set_debuglevel(1)
server.sendmail(fr, [to], msg)
server.quit()





 
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070116/e92ce493/attachment.html>


More information about the Python-list mailing list