Skip to content

solry/nmail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

nmail

SMTP mail sender.

With this package you will able to send mails in 1 line. There is two operations mode:

Installation:

pip install nmail

Inline mode:

Send Email inline:

       import nmail
       nmail.send_mail(to=['[email protected]','[email protected]'], 
                       cc=['[email protected]'],
                       bcc=['[email protected]'],
                       subject='No subject',
                       text='No Text',
                       attachments=['/tmp/test.txt'],
                       send_as='[email protected]',
                       smtp_server='10.0.0.1'
                       smtp_port=587
                       login='[email protected]'
                       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

Config mode:

Use config.yml to specify next variables:

    smtp_server: '10.0.0.1'
    smtp_port: 587
    login: '[email protected]'
    password: 'password'

Send email with specifying config.yml file:

    import nmail
    nmail.send_mail(to=['[email protected]','[email protected]'], 
                    cc=['[email protected]'],
                    bcc=['[email protected]'],
                    subject='No subject',
                    text='No Text',
                    attachments=['/tmp/test.txt'],
                    send_as='[email protected]',
                    config='/tmp/config.yml')

If you will not specify config variable - by default nmail will pick config.yml from package folder

About

One-line email sender with attachments, cc, bcc and send-as capability

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages