Hello,

I found this script to send mail online. It works fine but requires me to enter an mail server. I'm looking for something else that doesn't require and SMTP server. Having to specify a mail server prohibits me from sending to alternate domains.

Thanks in advance


smtpserver = 'my.mailserver.com'
        RECIPIENTS = ['[EMAIL PROTECTED]']
        SENDER = '[EMAIL PROTECTED]'
        mssg = SomeVariable

session = smtplib.SMTP(smtpserver)
              smtpresult = session.sendmail(SENDER, RECIPIENTS, mssg)
              if smtpresult:
                        errstr = ""
                        for recip in smtpresult.keys():
                            errstr = """Could not delivery mail to: %s

                    Server said: %s
                    %s

                    %s""" % (recip, smtpresult[recip][0], smtpresult[recip][1], errstr)
                        raise smtplib.SMTPException, errstr

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to