Please help us debug this... look into line 555 of gluon/tools.py server = smtplib.SMTP(*self.settings.server.split(':')) if self.settings.login != None: if self.settings.tls: server.ehlo() server.starttls() server.ehlo() server.login(*self.settings.login.split(':')) result = server.sendmail(self.settings.sender, to, payload.as_string()) server.quit()
add some print statements. Where does it fail? how? On Jul 27, 11:07 am, Andrew Buchan <andyha...@gmail.com> wrote: > Well it works from smtplib called from within web2py, so the server does > actually work. Can't actually seem to type in what you suggested into > telnet, that is an abomination of a command-line interface!!! :-) > So I'm thinking it must be something in the difference between web2py's mail > and smtplib's implementations... > > On Tue, Jul 27, 2010 at 4:13 PM, Adi <aditya.sa...@gmail.com> wrote: > > Have you tried using telnet to verify your server and mail are > > correctly configured? > > > Try this: > > > c:\> telnet 192.168.200.43 25 > > ehlo > > mail from:the...@h**********a.com > > recpt to: t...@h***********a.com > > data > > This is a test message > > > The recipient should be something valid. If this sends out email from > > your Windows server then the smtp relay is working. In that case > > please attach ehlo output. If this doesn't send out email, then the > > problem is not with your web2py code, but with your mail setup > > somewhere. > > > -- Adi > > > On Jul 27, 7:29 pm, Andrew Buchan <andyha...@gmail.com> wrote: > > > Massimo, > > > > 192.168.200.43 is a different windows box setup as a domino server, and > > the > > > smtplib example in original post works fine connecting to that server. > > The > > > windows box hosting the web2py application will not normally be connected > > to > > > the internet, so I can't go using google's smtp. > > > If I recall from the event log on domino (which I do not have access to > > > myself), the connection seems to be established but then dropped. Perhaps > > > the header is not in a correct format? > > > > Andrew. > > > > On Tue, Jul 27, 2010 at 3:06 PM, mdipierro <mdipie...@cs.depaul.edu> > > wrote: > > > > Is 192.168.200.43:25 the windows box itself or an external unix box? > > > > In the first case, do you have an email server running on windows? > > > > On unix this works because you have postfix but windows does not come > > > > with one. > > > > You may want to use an external smpt server like google. > > > > > On Jul 27, 9:00 am, Andrew Buchan <andyha...@gmail.com> wrote: > > > > > Thanks, but I tried that, along with a number of other port settings, > > > > > using smtp as prefix etc... Has anyone els managed to get this > > working > > > > > from a windows server? > > > > > > On Jul 22, 12:11 pm, Vasile Ermicioi <elff...@gmail.com> wrote: > > > > > > > > mail.settings.server= '192.168.200.43:25' > > > > > > > add port