SendGrid mail send API wrapper
Project description
aiohttp-sendgrid
================
.. image:: https://travis-ci.org/Kurlov/aiohttp-sendgrid.svg?branch=master
:target: https://travis-ci.org/Kurlov/aiohttp-sendgrid
.. image:: https://badge.fury.io/py/aiohttp-sendgrid.svg
:target: https://badge.fury.io/py/aiohttp-sendgrid
SendGrid mail API wrapper
Installation
------------
``pip install aiohttp_sendgrid``
Send email to single recipient
-------------------------------
.. code:: python
import asyncio
from aiohttp_sendgrid import Sendgrid
mailer = Sendgrid()
to = 'to@example.com'
sender = 'from@example.com'
subject = 'greetings'
content = '<h1>Hello</h1>'
send_mail = mailer.send(to, sender, subject, content)
loop = asyncio.get_event_loop()
loop.run_until_complete(send_mail)
Send single email to multiple recipients
----------------------------------------
.. code:: python
import asyncio
from aiohttp_sendgrid import Sendgrid
mailer = Sendgrid()
to = ['to@example.com', 'another@example']
sender = 'from@example.com'
subject = 'greetings'
content = '<h1>Hello</h1>'
send_mail = mailer.send(to, sender, subject, content)
loop = asyncio.get_event_loop()
loop.run_until_complete(send_mail)
================
.. image:: https://travis-ci.org/Kurlov/aiohttp-sendgrid.svg?branch=master
:target: https://travis-ci.org/Kurlov/aiohttp-sendgrid
.. image:: https://badge.fury.io/py/aiohttp-sendgrid.svg
:target: https://badge.fury.io/py/aiohttp-sendgrid
SendGrid mail API wrapper
Installation
------------
``pip install aiohttp_sendgrid``
Send email to single recipient
-------------------------------
.. code:: python
import asyncio
from aiohttp_sendgrid import Sendgrid
mailer = Sendgrid()
to = 'to@example.com'
sender = 'from@example.com'
subject = 'greetings'
content = '<h1>Hello</h1>'
send_mail = mailer.send(to, sender, subject, content)
loop = asyncio.get_event_loop()
loop.run_until_complete(send_mail)
Send single email to multiple recipients
----------------------------------------
.. code:: python
import asyncio
from aiohttp_sendgrid import Sendgrid
mailer = Sendgrid()
to = ['to@example.com', 'another@example']
sender = 'from@example.com'
subject = 'greetings'
content = '<h1>Hello</h1>'
send_mail = mailer.send(to, sender, subject, content)
loop = asyncio.get_event_loop()
loop.run_until_complete(send_mail)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aiohttp_sendgrid-0.0.3.tar.gz
(4.3 kB
view hashes)
Built Distribution
Close
Hashes for aiohttp_sendgrid-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca3307bc0d5546e9511150774a63c46b361cac370c6b3e37e4625fe2f0c0ec81 |
|
MD5 | 4a3bd895e01e07938a5b715783c1e27f |
|
BLAKE2b-256 | 3a0db90f24ba3be0e585ebec761153b8afcd2be61c46ef840f4dedc430747f08 |