Hello,

In testing the registration on my app, I am confused about how to send a new
user an email.

When a new user is registering using the defaults that come with web2py,
I can see in the db that for a new user, there is a field 
db.auth_user.email,
so I am trying to use that to send a mail to the new user, and using
the "logging" mechanism to test.

in the model db.py I try adding this:

newuser = db(db.auth_user.email==email).select()
mail.send(to=['newuser'],
          subject='Welcome, etc.',
          # If reply_to is omitted, then mail.settings.sender is used
          reply_to='myemailaddr...@gmail.com',
          message='You will be able to login when you receive another email 
stat
ing that the registration is completed.'),


Also tried
mail.send(to'['db.auth_user.email'],

in both cases the To: field gets populated with exactly those fields,

To: newuser  or To: db.auth_user.email

How do I access this variable please?

I don't see an example in the book or the cookbook, or in the web2py-users 
group
that explains in a way I understand.

thanks for any help,
Margaret

-- 



Reply via email to