Ok still having an issue with web2py email:

I'm still using the default email setup with my credentials in the 
appconfig file

I've moved past the payload issue. It turns out that the message variable 
wasn't receiving a value as intended.

That sorted, I'm now getting another inscrutable error message:

Here's the traceback:

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.

Traceback (most recent call last):
  File "/home/vgr2/web2py/gluon/restricted.py", line 227, in restricted
    exec ccode in environment
  File "/home/vgr2/web2py/applications/quiz_app/controllers/default.py" 
<http://127.0.0.1:8000/admin/default/edit/quiz_app/controllers/default.py>, 
line 656, in <module>
  File "/home/vgr2/web2py/gluon/globals.py", line 417, in <lambda>
    self._caller = lambda f: f()
  File "/home/vgr2/web2py/applications/quiz_app/controllers/default.py" 
<http://127.0.0.1:8000/admin/default/edit/quiz_app/controllers/default.py>, 
line 535, in thankyou
    if mail.send(to = candidate.email, subject = subject, message = message):
  File "/home/vgr2/web2py/gluon/tools.py", line 466, in send
    elif message.strip().startswith('<html') and \
  File "/home/vgr2/web2py/gluon/packages/dal/pydal/objects.py", line 90, in 
__getattr__
    raise AttributeError
AttributeError

When I comment out the line with mail.send and echo the input variables, I 
see the appropriate values:
'v*****@gmail.com', 'Your CSS Mastery results' and 'Range 1 message text' 
for 'to', 'subject' and 'message' respectively.

What could be the cause of something like this? Thanks in advance.



On Saturday, March 26, 2016 at 3:08:05 PM UTC-5, Valdeck Rowe wrote:
>
> The thing is that the error doesn't seem to have anything to do with the 
> the code I wrote. 
>
> Here is the traceback:
> Version
> web2py™ Version 2.13.4-stable+timestamp.2015.12.26.04.59.39Traceback
>
> 1.
> 2.
> 3.
> 4.
> 5.
> 6.
> 7.
> 8.
> 9.
> 10.
> 11.
> 12.
>
> Traceback (most recent call last):
>   File "/home/vgr2/web2py/gluon/restricted.py", line 227, in restricted
>     exec ccode in environment
>   File "/home/vgr2/web2py/applications/quiz_app/controllers/default.py" 
> <http://127.0.0.1:8000/admin/default/edit/quiz_app/controllers/default.py>, 
> line 642, in <module>
>   File "/home/vgr2/web2py/gluon/globals.py", line 412, in <lambda>
>     self._caller = lambda f: f()
>   File "/home/vgr2/web2py/applications/quiz_app/controllers/default.py" 
> <http://127.0.0.1:8000/admin/default/edit/quiz_app/controllers/default.py>, 
> line 522, in thankyou
>     if mail.send([candidate.email], subject, message, []):
>   File "/home/vgr2/web2py/gluon/tools.py", line 745, in send
>     payload = payload_in
> UnboundLocalError: local variable 'payload_in' referenced before assignment
>
> This is very confusing to me, been at this for  a while now.
>

-- 
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.

Reply via email to