Skip to main content

A simple way to send email. for dsm

Project description

DSM Email

install

pip install dsmemail

how to use

  1. set env
DSM_EMAIL_URI=<DSM_EMAIL_URI>
DSM_EMAIL_APIKEY=<DSM_EMAIL_APIKEY>
  1. send email
import dsmemail

status, msg = dsmemail.sendEmail(
    subject="test", 
    message="helloworld", 
    emails=["admin@admin.com"],
    attachments=["test.txt"]
)
print(status, msg)
variable dtype description
subject str subject of email
message str email body can contains html string
emails List[str] email to send message
attachments List[str] list of filepath(str) to attach files

output

(True, 'email send sucess')

status

True = send email sucess
False = send email fail

msg

string describe status

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

dsmemail-0.0.5.tar.gz (3.0 kB view details)

Uploaded Source

File details

Details for the file dsmemail-0.0.5.tar.gz.

File metadata

  • Download URL: dsmemail-0.0.5.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.6

File hashes

Hashes for dsmemail-0.0.5.tar.gz
Algorithm Hash digest
SHA256 56d8800c5168e90ff43898f14d35e79f7cd2cf0073bef8b137b4c32e2b318192
MD5 45c04a9c09952f80decec7aef6b6a73a
BLAKE2b-256 eb1f2a4529d4732daf2da7d7f6179f684881eaeeb66f703ba9d82935dc955e62

See more details on using hashes here.

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