One-line SMPT email sender
Project description
# nmail
### SMTP mail sender.
With this package you will able to send mails in 1 line.
There is two operations mode:
### __Config mode__:
Use `config.yml` to specify next variables:
smtp_server: '10.0.0.1'
smtp_port: 587
login: 'username@corp.com'
password: 'password'
Send email with specifying `config.yml` file:
import nmail
nmail.send_mail(to=['mybro@example.com','someone@example.com'],
cc=['copy@example.com'],
bcc=['hidden_copy@example.com'],
subject='No subject',
text='No Text',
attachments=['/tmp/test.txt'],
send_as='delegated_mailbox@example.com',
config='/tmp/config.yml')
> If you will not specify __config__ variable - by default nmail will pick config.yml __from package folder__
### __Inline mode__:
Send Email inline:
import nmail
nmail.send_mail(to=['mybro@example.com','someone@example.com'],
cc=['copy@example.com'],
bcc=['hidden_copy@example.com'],
subject='No subject',
text='No Text',
attachments=['/tmp/test.txt'],
send_as='delegated_mailbox@example.com',
smtp_server='10.0.0.1'
smtp_port=587
login='username@corp.com'
password='password')
> Also, you may override some of parameters by __specifying__ it in the `send_mail` function call.
Other params will be gathered from __config file__
### SMTP mail sender.
With this package you will able to send mails in 1 line.
There is two operations mode:
### __Config mode__:
Use `config.yml` to specify next variables:
smtp_server: '10.0.0.1'
smtp_port: 587
login: 'username@corp.com'
password: 'password'
Send email with specifying `config.yml` file:
import nmail
nmail.send_mail(to=['mybro@example.com','someone@example.com'],
cc=['copy@example.com'],
bcc=['hidden_copy@example.com'],
subject='No subject',
text='No Text',
attachments=['/tmp/test.txt'],
send_as='delegated_mailbox@example.com',
config='/tmp/config.yml')
> If you will not specify __config__ variable - by default nmail will pick config.yml __from package folder__
### __Inline mode__:
Send Email inline:
import nmail
nmail.send_mail(to=['mybro@example.com','someone@example.com'],
cc=['copy@example.com'],
bcc=['hidden_copy@example.com'],
subject='No subject',
text='No Text',
attachments=['/tmp/test.txt'],
send_as='delegated_mailbox@example.com',
smtp_server='10.0.0.1'
smtp_port=587
login='username@corp.com'
password='password')
> Also, you may override some of parameters by __specifying__ it in the `send_mail` function call.
Other params will be gathered from __config file__
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nmail-0.0.2.tar.gz
(2.8 kB
view hashes)
Built Distribution
nmail-0.0.2-py3-none-any.whl
(4.0 kB
view hashes)