[web2py] Re: Mail function

2010-09-28 Thread Kenneth
Thank you Massimo for your help. Now I get it working until I tried to also use the bcc option. I´m getting this ticket: 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. Traceback (most recent call last): File "gluon/restricted.py", line 188, in restricted exec ccode in environment File "

[web2py] Re: Mail function

2010-09-28 Thread mdipierro
mail_receivers = ['kenn...@test.com','kenn...@test2.com'] On Sep 28, 7:52 am, Kenneth wrote: > But how should that list look like. > > mail_receivers = 'kenn...@test.com, kenn...@test2.com' does not work, > it only sends that mail to the first receivers. > > Kenneth > > On Sep 28, 3:50 pm, mdipie

[web2py] Re: Mail function

2010-09-28 Thread Kenneth
But how should that list look like. mail_receivers = 'kenn...@test.com, kenn...@test2.com' does not work, it only sends that mail to the first receivers. Kenneth On Sep 28, 3:50 pm, mdipierro wrote: > exactely like you said: > >     def send( >         self, >         to, >         subject='N

[web2py] Re: Mail function

2010-09-28 Thread mdipierro
exactely like you said: def send( self, to, subject='None', message='None', attachments=None, cc=None, bcc=None, reply_to=None, encoding='utf-8', ): to, cc and bcc can be lists of addresses. On Sep 28, 7:11 am, K

[web2py] Re: Mail function not working

2010-08-06 Thread mdipierro
Try this: python web2py.py -s yourapp -M -N >>> mail.settings.server='' >>> mail.settings.sender='' >>> mail.settings.login='' >>> mail.send() It should print any print you add to the source to the console. You can also try >>> mail.settings.server='logging' and it should log th

[web2py] Re: Mail function not working

2010-08-06 Thread Andrew Buchan
Adi, For some resaon I completely missed your reply until now. I tried your suggestion and it worked! Massimo> I'll take it from this that you no longer need me to debug in any way... Thanks for all the help guys. On Jul 27, 4:25 pm, Adi wrote: > Since you're able to use smtplib my suggestion

Re: [web2py] Re: Mail function not working

2010-07-28 Thread Andrew Buchan
Thanks michele, I was just reading up on all that (windows logging is another thing I have no clue about :-) . I already have pywin32 extensions, which was necessary for some other part of web2py to run. I think my errors are being sent to the event viewer as information from web2py does show up t

Re: [web2py] Re: Mail function not working

2010-07-28 Thread Michele Comitini
http://sourceforge.net/projects/pywin32/ 2010/7/28 Michele Comitini > I do not use win since ages ( :) ), but i remember that using pywin32 > extensions it was easy to debug sending error from the application > running as a service to the windows logging service. > > > > 2010/7/28 Andrew Buc

Re: [web2py] Re: Mail function not working

2010-07-28 Thread Michele Comitini
I do not use win since ages ( :) ), but i remember that using pywin32 extensions it was easy to debug sending error from the application running as a service to the windows logging service. 2010/7/28 Andrew Buchan > Massimo, > > Where is this meant to print to? I'm running the whole thing as >

Re: [web2py] Re: Mail function not working

2010-07-28 Thread Andrew Buchan
Massimo, Where is this meant to print to? I'm running the whole thing as a windows service so there's no command line open. Also there's tool.py and tools.pyc, I can only edit tools.py, but I'm thinking it's the pyc file which is being read? Do I need to recompile or do something similar? If so, I

[web2py] Re: Mail function not working

2010-07-27 Thread mdipierro
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.s

Re: [web2py] Re: Mail function not working

2010-07-27 Thread Andrew Buchan
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

[web2py] Re: Mail function not working

2010-07-27 Thread Adi
Since you're able to use smtplib my suggestion is invalid (I didn't read carefully enough last time) Once I faced this problem, and the ehlo output did not have AUTH (which means AUTH was not enabled on the mail server), and all I did was remove mail.settings.login line and it started working. May

[web2py] Re: Mail function not working

2010-07-27 Thread Adi
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 y

Re: [web2py] Re: Mail function not working

2010-07-27 Thread Andrew Buchan
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

[web2py] Re: Mail function not working

2010-07-27 Thread mdipierro
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, Andre

[web2py] Re: Mail function not working

2010-07-27 Thread Andrew Buchan
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 wrote: > > mail.settings.server= '192.168.200.43:25' > >  add port