Yes , you can. from gluon.tools import Mail
other_mail = Mail() other_mail.settings.server = 'smtp.example.com:25' other_mail.settings.sender = 'u...@example.com' other_mail.settings.login = 'username:password' And for sending emails other_mail.send('y...@example.com','Message subject', 'Plain text body of the message') On Friday, February 17, 2017 at 2:10:48 AM UTC+5:30, Gael Princivalle wrote: > > Hello. > > I use a mailgun smtp for large invoices. > It works fine but the invoice could begin after a couple of minutes. > > I use registration requires verification: > auth.settings.registration_requires_verification = True > > If the user wait for this email verification for 2 minutes he could think > there's a problem. > Could I set 2 different mail settings? > Like that I can choose a standard faster one for these system messages. > > mail = auth.settings.mailer > mail.settings.server = 'smtp.example.com:25' > mail.settings.sender = 'y...@example.com <javascript:>' > mail.settings.login = 'username:password' > > Thanks. > -- 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.