[web2py] Re: Exception: Server address not specified

2015-08-04 Thread Massimo Di Pierro
before the mail.send print mail.settings.sender. It is possible this value 
is reset somewhere else. It should work

On Monday, 3 August 2015 16:04:36 UTC-5, Mark Billion wrote:

 Im pulling straight from the book and running on python anywhere, so Im a 
 bit confused:

 web2py Shell 2.11.2-stable+timestamp.2015.05.30.16.33.24
 In [1] : from gluon.tools import Mail

 In [2] : mail = Mail()

 In [3] : mail.settings.server = 'smtp.gmail.com:465'

 In [4] : mail.settings.sender = 'a...@gmail.com'

 In [5] : mail.settings.login = 'a...@gmail.com:b' == Alt (Ive used both): In 
 [5] : mail.settings.login = 'a:b'

 In [6] : q=mail.send('j...@doe.com', 'Message subject', 'Plain text body 
 of the message')
 Traceback (most recent call last):
   File ..gluon/contrib/shell.py, line 235, in run
 exec compiled in statement_module.__dict__
   File string, line 1, in module
   File gluon/tools.py, line 437, in send
 raise Exception('Server address not specified')
 Exception: Server address not specified

 Any thoughts?


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Exception: Server address not specified

2015-08-04 Thread Mark Billion
Its strange

web2py Shell 2.7.4-stable+timestamp.2013.10.14.15.16.29In [1] : from
gluon.tools import Mail

In [2] : mail = Mail()

In [3] : mail.settings.server = 'smtp.gmail.com:465'

In [4] : mail.settings.sender = 'm...@gmail.com'

In [5] : mail.settings.login = 'm...@gmail.com:xyz'

In [6] : print mail.settings.sender
markbill...@gmail.com

All is okay.  Then when I run  q=mail.send('j...@doe.com', 'Message
subject', 'Plain text body of the message'), literally the system stops
responding (Im on web2py) and it wont even print me any output.  I have to
reload the webapp


On Tue, Aug 4, 2015 at 11:19 AM, Massimo Di Pierro 
massimo.dipie...@gmail.com wrote:

 before the mail.send print mail.settings.sender. It is possible this value
 is reset somewhere else. It should work


 On Monday, 3 August 2015 16:04:36 UTC-5, Mark Billion wrote:

 Im pulling straight from the book and running on python anywhere, so Im a
 bit confused:

 web2py Shell 2.11.2-stable+timestamp.2015.05.30.16.33.24
 In [1] : from gluon.tools import Mail

 In [2] : mail = Mail()

 In [3] : mail.settings.server = 'smtp.gmail.com:465'

 In [4] : mail.settings.sender = 'a...@gmail.com'

 In [5] : mail.settings.login = 'a...@gmail.com:b' == Alt (Ive used both):
 In [5] : mail.settings.login = 'a:b'

 In [6] : q=mail.send('j...@doe.com', 'Message subject', 'Plain text body
 of the message')
 Traceback (most recent call last):
   File ..gluon/contrib/shell.py, line 235, in run
 exec compiled in statement_module.__dict__
   File string, line 1, in module
   File gluon/tools.py, line 437, in send
 raise Exception('Server address not specified')
 Exception: Server address not specified

 Any thoughts?

 --
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 ---
 You received this message because you are subscribed to a topic in the
 Google Groups web2py-users group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/web2py/hn2F-FhI2rw/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to
 web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.




-- 
Mark M. Billion
1904 N. Lincoln
Wilmington, DE 19806
302.416.2199

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.