Messages: Create and send messages fast!

PyPI version

messages_words

Purpose

Installation

Python3 only

$ pip install messages

Documentation in the Wiki

Supported Messages

Examples

Email

REPL -- before configuration

>>> from messages import Email
>>> msg = 'Hello,\n\tBuy more Bitcoin!'
>>> m = Email(
            from_='me@here.com',
            server='smtp.here.com',
            port=465,
            to='you@there.com',
            auth='p@ssw0rd',       
            body=msg,
            attachments=['./file1.txt', '~/Documents/file2.pdf'],
            profile='myProfileName',
            save=True               # save user params for easier invocations later
   )
>>>
>>> m.send()        
Message sent...

REPL -- after configuration

Using the save=True keyword arg in the example above saves the _from__, server, port, and auth params, under the profile name myProfileName so you don't have include them in future calls, like below:

>>> from messages import Email
>>> msg = 'Hello,\n\tBuy more Bitcoin!'
>>> m = Email(
            to='you@there.com',      
            body=msg,
            attachments=['./file1.txt', '~/Documents/file2.pdf'],
            profile='myProfileName',
   )
>>>
>>> m.send()        
Message sent...

CLI

$ messages email myProfileName 'Hello,\n\tBuy more Bitcoin!' \
--to you@there.com \
--attach ./file.txt \
--attach ~/Documents/file2.pdf \
Message sent...

Read the Wiki for more examples

Contributing Code