Hello,

I can't get the web2py mail function to work despite trying a
multitude of settings (in fact I used a 'brute-force' attack to try
all the possible combinations I could think of), here's the latest in
my db.py:

mail=Mail()
mail.settings.server= '192.168.200.43'
mail.settings.sender= 'the...@h**********a.com'
auth.settings.mailer = mail
mail.settings.login= None


However, in a module I have the following, which works fine:

-----
import smtplib

def....
    msg_body = "\r\n".join([
        "From: %s" % FROM,
        "To: %s" % to,
        "Subject: %s" % subject,
        "",
        message])
    server = smtplib.SMTP('192.168.200.43')
    server.sendmail(FROM, [to], msg_body )
    server.quit()
-----

This has done me until now, but now I need to enable
"auth.settings.registration_requires_verification = True", and the
password reset functions. So I either need to get web2py's mail to
work, or make web2py use the smtplib method as above, preferably the
former.
Its a windows server with web2py running as a service and the python
service is allowed to send emails.

Any suggestions?
Thanks.

Reply via email to