/python-email-sender

Sending e-mails using Python3

Primary LanguagePythonMIT LicenseMIT

python-email-sender

This is an automatic e-mail sender using Python.

Dependencies

  • Python 3.7+
  • smtplib
  • email

Installation

To get started, download and put "email_sender.py" under the folder that contains your project files that send emails.

Usage

An example usage inside a project is given below.

from email_sender import EmailSender

receiver_email = "jane.doe@example.com"
subject = "The first e-mail"
message_body = "This is a body of the message."
attachments = ["image.png", "output.pdf"]

email_sender = EmailSender("john.doe@example.com", "Pswrd!0001")
email_sender.send_email(receiver_email, subject, message_body, attachments)

References

License

This work is published under MIT License.