SMTP help please
Martin Franklin
mfranklin1 at gatwick.westerngeco.slb.com
Tue Jun 7 04:25:04 EDT 2005
Ivan Shevanski wrote:
> I really can't figure out anything about the SMTP module. . .I think I'm
> in over my head( Im pretty new to python). Can someone show me a
> really(and I mean REALLY) basic tutorial for smtp or explain it?
>
> program:
> I want to make my program have a feedback form attached to it at the end
> which sends me the form when they're done. I don't especially want them
> to have to input all the needed details though. . .Just thought I'd put
> this in so you'd know what its for.
>
>
>
> -Ivan
>
> _________________________________________________________________
> Don’t just search. Find. Check out the new MSN Search!
> http://search.msn.click-url.com/go/onm00200636ave/direct/01/
>
Ivan,
import smtplib
server = smtplib.SMTP("mailserver.somewhere.com")
server.set_debuglevel(3)
fromaddr = "myemail at address.org"
toaddrs = ["first at somewhere.com", "second at smewhere.com"]
msg = """Subject: Hi I'm great
Thats right I really am
"""
server.sendmail(fromaddr, toaddrs, msg)
server.quit()
HTH
Martin
More information about the Python-list
mailing list