web2py is failing to connect and send the email. Something is wrong in
the settings. To debug, you can try add something some print
statements inside the class Mail send function. Sorry I do not have a
better advice.

On Dec 1, 12:27 pm, Bernardo Botella Corbí <[email protected]> wrote:
> It prints
>
> False
>
> Bernardo
>
> 2010/12/1 mdipierro <[email protected]>
>
> > try from the shell
>
> > python web2py.py -A yourapp -N -M
>
> > print mail.send(to="....@...", message="....", subject="...")
>
> > Massimo
>
> > On Dec 1, 11:55 am, Bernardo <[email protected]> wrote:
> > > Hi Massimo,
>
> > > thanks for your reply. I connected without problems using telnet on
> > > port 25
>
> > > >telnet mydomain.com 25
>
> > > Connected to mydomain.com.
> > > Escape character is '^]'.
> > > 220 mydomain.com ESMTP Postfix (Ubuntu)
> > > EHLO mydomain.com
> > > 250-mydomain.com
> > > 250-PIPELINING
> > > 250-SIZE 10240000
> > > 250-ETRN
> > > 250-STARTTLS
> > > 250-AUTH CRAM-MD5 DIGEST-MD5 LOGIN PLAIN
> > > 250-ENHANCEDSTATUSCODES
> > > 250-8BITMIME
> > > 250 DSN
>
> > > on the other hand, the username is the same I use to send an email
> > > from thunderbird.
>
> > > kind regards,
> > > Bernardo
>
> > > On 1 dic, 16:49, mdipierro <[email protected]> wrote:
>
> > > > try telnet mail.mydomain.com 25 and see if it is accepting remote
> > > > connections (by defau postfix does not).
>
> > > > Also I think
>
> > > > mail.settings.login = '[email protected]:mypass'
>
> > > > should be
>
> > > > mail.settings.login = 'berna...:mypass'
>
> > > > On Dec 1, 5:44 am, Bernardo <[email protected]> wrote:
>
> > > > > Dear all,
>
> > > > > I don't know if it is exactly a web2py issue or not. The fact is that
> > > > > I have a remote mail server, listening in port 25. It uses a self
> > > > > created certificate to allow connections from the outside (i.e. for
> > > > > thunderbird, you must accept that certificate in order to send
> > mails).
> > > > > The problem is that when I try to send an email:
>
> > > > > mail.send(to='[email protected]',subject='Hello world
> > > > > subject',message='Hello world text')
>
> > > > > but nothing happens. Not a single messange printed on python console.
> > > > > And nothing shown in postfix log
>
> > > > > The lines in db.py are:
> > > > > mail.settings.server = 'mail.mydomain.com:25'
> > > > > mail.settings.sender = '[email protected]'         # your email
> > > > > mail.settings.login = '[email protected]:mypass'      # your
> > > > > credentials or None
> > > > > mail.settings.cipher_type = 'x509'
> > > > > mail.settings.x509_sign_keyfile = 'url_to_postfix.key'
> > > > > mail.settings.x509_sign_certfile = 'url_to_postfix.cert'
>
> > > > > Does anyone can figure out what is wrong with all of this?
>
> > > > > thanks a lot for your time,
> > > > > Bernardo
>
>

Reply via email to