Dear, Have a look on follwoing working code
*#---** Email Setting **-------*
mail.settings.server = 'smtp.gmail.com:587' or 'logging'
mail.settings.sender = '[email protected]'
mail.settings.tls = True
mail.settings.login = '[email protected]:password'


*#---**  Controller code **-------*
context = {'subject':'''<span class="fa-stack">
                                <i class="ion-ios-circle-outline
fa-stack-2x"></i>
                                <i class="fa fa-key fa-stack-1x "></i>
                            </span> Application Access Key''',
                'variable1':'variable1 value',
                'variable2':'variable2 value'
                    }
            message = response.render('template/mail/accesskey_mail.html',
context)
            mail.send(to=[receiver1, receiver2],
                      subject='Your Subject',
                      message=message)



*#---** View/Template **-------*
{{include 'template/mail/header.html'}}
{{if response._vars:}}

<p>Hello,</p>

<p>
    Your mail content here <br/>

   <div>{{=XML(response._vars['variable1'])}}</h2>
    <h4>{{=XML(response._vars['variable2'])}}</h4>
</div>
<br/>
</p>

{{pass}}
{{include 'template/mail/footer.html'}}





On Tue, May 17, 2016 at 3:34 PM, Sukrut Joshi <[email protected]> wrote:

> no google is not sending any mail..means my mailer is not working
>
> On Tue, May 17, 2016 at 2:59 PM, Vic Ding <[email protected]> wrote:
>
>> You mentioned "mail not deliver to mailer".
>> Mailer is the person or the mailing program, in your case: google?
>>
>> I am no expert in web2py, trying to see it from different angle.
>> Have you checked the mail log to verify if the mail is received and sent
>> by the mailer?
>> Many mailers do not work out of the box. For example, you have to "allow"
>> apps to use google as mailer on gmail.
>>
>>
>> On Tuesday, May 17, 2016 at 9:49:08 AM UTC+2, Sukrut Joshi wrote:
>>>
>>> When I complete the registration form a flash appears on the top-right
>>> corner of the page with a flash message "Email sent" but mail is not
>>> deliver to mailer
>>> please help me
>>> i used these setting in db.py
>>>
>>>
>>> from gluon.tools import Auth
>>> auth = Auth(db)
>>> auth.define_tables(username=False,signature=False)
>>> auth.settings.registration_requires_verification = True
>>> auth.settings.registration_requires_approval = True
>>> auth.settings.reset_password_requires_verification = True
>>>
>>> mail = auth.settings.mailer
>>> mail.settings.server = 'smtp.gmail.com:465'
>>> mail.settings.sender = '[email protected]'
>>> mail.settings.server = 'logging'
>>> mail.settings.login ='[email protected]:example'
>>>
>>> i have changed email and password
>>>
>> --
>> 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 [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> 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 [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to