You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fromenvialosimple.transaccionalimportTransaccionalfromenvialosimple.transaccional.mailimportMailParamsestr=Transaccional(your_api_key)
params=MailParams(
from_email='no-reply@mycompany.com',
from_name='MyCompany Notifications',
to_email='john.doe@example.com',
to_name='John Doe',
reply_to='reply@here.com',
subject='This is a test for {{name}}',
preview_text='A glimpse of what comes next...',
html='<h1>HTML emails are cool, {{name}}</h1>',
text='Text emails are also cool, {{name}}',
context={'name': 'John'})
estr.mail.send(params)
Multiple Recipients Usage
fromenvialosimple.transaccionalimportTransaccionalfromenvialosimple.transaccional.mailimportMailParamsestr=Transaccional(your_api_key)
params=MailParams(
from_email='no-reply@mycompany.com',
from_name='MyCompany Notifications',
to_email=[
{"email": 'jane.doe@example.com', "name": 'Jane Doe'},
{"email": 'sean.smith@example.com', "name": 'Sean Smith'},
{"email": 'john.doe@example.com'}
],
reply_to='reply@here.com',
subject='This is a test for {{name}}',
preview_text='A glimpse of what comes next...',
html='<h1>HTML emails are cool, {{name}}</h1>',
text='Text emails are also cool, {{name}}',
context={'name': 'John'})
estr.mail.send(params)