mailgun
mailgun
- class platypush.plugins.mailgun.MailgunPlugin(api_key: str, api_base_url: str = 'https://api.mailgun.net/v3', **kwargs)[source]
Mailgun integration.
- __init__(api_key: str, api_base_url: str = 'https://api.mailgun.net/v3', **kwargs)[source]
- Parameters:
api_key – Mailgun API secret key.
api_base_url – Use
https://api.eu.mailgun.net/v3
if you are using an EU account.
- send(domain: str, to: Union[str, Sequence[str]], from_: Optional[str] = None, cc: Optional[Union[str, Sequence[str]]] = None, bcc: Optional[Union[str, Sequence[str]]] = None, subject: str = '', body: str = '', body_type: str = 'plain', attachments: Optional[Sequence[str]] = None, **kwargs)[source]
Send an email through Mailgun.
- Parameters:
domain – From which registered domain the email(s) should be sent.
to – Receiver(s), as comma-separated strings or list.
from – Sender email address (
from
is also supported outside of Python contexts).cc – Carbon-copy addresses, as comma-separated strings or list
bcc – Blind carbon-copy addresses, as comma-separated strings or list
subject – Mail subject.
body – Mail body.
body_type – Mail body type -
text
orhtml
.attachments – List of attachment files to send.