Skip to main content

Sends messages to various APIs for email or discord

Project description

API Sender

Sends messages to various APIs for email or discord

from apisender import Apisender
Supported APIs:

- Discord
- Mailjet
- SMTP2GO

Todo:
- Mailgun
- Twillo (sms)
- Telnyx (sms)
Examples:

    fromname = "fromname"
    fromid = "from@test.com"
    subject = "test subject"
    toid = "to@test.com"
    toname = "toname"
    bodytext = "test text"
    bodyhtml = "<h1>test html</h1>"
    subject = "test subject"

    print(Apisender(fromname=fromname,
                    bodytext=bodytext).discord().text)

    print(Apisender(fromname=fromname,
                    fromid=fromid,
                    toname=toname,
                    toid=toid,
                    subject=subject,
                    bodytext=bodytext,
                    bodyhtml=bodyhtml).mailjet().text)

    print(Apisender(fromid=fromid,
                    toid=toid,
                    subject=subject,
                    bodytext=bodytext).smtp2go().text)
Notes:
    - No except checks are done for failed sending.
    - Check is done if password file is missing.
    - Requires requests to work.
    - Returns requests responses.
    - apisender.json is where you keep your passwords

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

apisender-1.0.0b0.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

apisender-1.0.0b0-py3-none-any.whl (3.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page