[FRPythoneers] e-mail from cgi

Jim Vickroy Jim.Vickroy at noaa.gov
Mon Jun 3 12:42:53 MDT 2002


If you decide to use smtlib, here is a fragment illustrating its use:

import smtplib, socket

server_name = 'your mail server name goes here'
sender = 'your e-mail address goes here'
recipients = ['e-mail addr of 1st recipient', ...]
message = '''

server = smtplib.SMTP(server_name)

data = 'Subject: ' + str(subject) + '\n\n' + str(message)

   unreachable_recipients = server.sendmail(sender, recipients, data)

print unreachable_recipients

"J. Wayde Allen" wrote:

> Am currently needing to gather information for a meeting from a web form
> and generate a formated e-mail.  I've got most of the basic web form
> generation done and am working on processing these data.  However, I'm
> wondering if there is a recommended way to generate the e-mail?  I was
> just tinkering with the smtplib module, but am not too sure how to use it
> yet.  Is this on the best module to use?
> - Wayde
>   (wallen at its.bldrdoc.gov)
> _______________________________________________
> This message sent by the FRPythoneers mailing list.
> Unsubscribe: echo unsubscribe | FRPythoneers-request at lists.community.tummy.com
> URL: http://lists.community.tummy.com/mailman/listinfo/frpythoneers

More information about the FRPythoneers mailing list