I am working on the last part of my application where I send a text message 
as an e-mail using gluon.contrib.sms_utils to set up the e-mail address but 
I am not receiving anything (I have it set up to send the message to my 
phone). 

This is my controller setup (in default.py):

def send_text():
    from gluon.contrib.sms_utils import SMSCODES, sms_email

    # Retrieve the phone number and phone carrier info
    number = '1 (111) 111-1111'    # Phone number
    provider = 'AT&T'

    # Set up the e-mail address
    email = sms_email(number, provider)

    # Message to be sent
    message = 'This is a test'

    # Send message
    mail.send(to=email, subject='TrackAlert', message=message)

    return dict(result=mail.result)

This is my model setup (in db.py):
from gluon.tools import Mail

## configure email
mail = Mail()
mail.settings.server = "smtp.gmail.com:587" or "gae"   # I also tried port 
25 and 465
mail.settings.sender = "tra...@gmail.com"    # Test e-mail address
mail.settings.tls = True or False
mail.settings.login = "tra...@gmail.com:Thisisatest"  # Username:Password

I am calling the function directly from the URL as such:

http://127.0.0.1:8000/TrackAlert/default/send_text


I am not receiving any errors but yet I'm not getting the text message.  I 
don't have a view set up for this because it will be called from another 
script.

Am I missing something?

I'd greatly appreciate any help! This is part of my senior project that I 
need to present tomorrow :(

-- 
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/groups/opt_out.

Reply via email to