astar666
asked on
python email from web cgi
Consider this:
def emailmessage(message):
email="From: root@tacomaliteracy.org\r\ nTo: tutorregistration@tacomali teracy.org \r\nSubjec t: tutor registration\r\n\r\n"+mess age
server = smtplib.SMTP('localhost')
server.sendmail("root@taco maliteracy .org", "tutorregistration@tacomal iteracy.or g,astar@sp amcop.net" , email)
server.quit()
Look at the second to last physical and logical line and you note I have two emails to which I am sending the email message. My reading of the library doc suggests this is the correct format. In practice, it works only if there is one and only one to address. You might think sendmail needs configuring, but each of the above two addresses work individually.
Please advise.
def emailmessage(message):
email="From: root@tacomaliteracy.org\r\
server = smtplib.SMTP('localhost')
server.sendmail("root@taco
server.quit()
Look at the second to last physical and logical line and you note I have two emails to which I am sending the email message. My reading of the library doc suggests this is the correct format. In practice, it works only if there is one and only one to address. You might think sendmail needs configuring, but each of the above two addresses work individually.
Please advise.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.