Exception: Server address not specified

172 views
Skip to first unread message

Mark Billion

unread,
Aug 3, 2015, 5:04:36 PM8/3/15
to web2py-users
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('jo...@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?

Massimo Di Pierro

unread,
Aug 4, 2015, 11:19:04 AM8/4/15
to web2py-users
before the mail.send print mail.settings.sender. It is possible this value is reset somewhere else. It should work

Mark Billion

unread,
Aug 4, 2015, 1:46:20 PM8/4/15
to web...@googlegroups.com
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

All is okay.  Then when I run  q=mail.send('jo...@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....


--
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+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Mark M. Billion
1904 N. Lincoln
Wilmington, DE 19806
302.416.2199
Reply all
Reply to author
Forward
0 new messages