Skip to main content

Email sending tempalte for beginers to send emails

Project description

EmailTemplate

This is to allow beginners to easily send emails.  This project contains some
basic templates.

To install this package, please use pip install EasyEmailTemplate

emailtablenofile

This is used to send a HTML file created by pandas in the email by passing
the html table direclty to the template.

Requirements:
    host= SMTP address
    sender = Senders email address
    password = Senders password
    port = Senders email port address
    reciver = Who is getting the email
    title = subject line to the email.
    text = the bodys text
    html = the HTML content for the email.

Example:
The following code block creates a html template to be added with the pandas
dataframe to create a table and output to html to pass the the template for
the email to send out.
    message_style = """
<html>
  <head><title>HTML Pandas Dataframe with CSS</title></head>
  <link rel="stylesheet" type="text/css" href="df_style.css"/>

  <style type="text/css" media="screen">
      #mystyle {
    font-size: 11pt;
    font-family: Arial;
    border-collapse: collapse;
    border: 1px solid silver;

  }

  #mystyle td,
  th {
    padding: 5px;
    text-align: center;
    vertical-align: center;
  }

  #mystyle tr:nth-child(even) {
    background: #E0E0E0;
    text-align: center;
    vertical-align: center;
  }

  #mystyle tr:hover {
    background: silver;
    cursor: pointer;
    text-align: center;
    vertical-align: center;
    font-weight: bold;
  }
  </style>
</head>
  <body>
"""
result = df.to_html(index=False, render_links=True, table_id="mystyle", escape=False)

emailtextnofile

This is used to send emails with text only.

Requirments:
    host= SMTP address
    sender = Senders email address
    password = Senders password
    port = Senders email port address
    reciver = Who is getting the email
    title = subject line to the email.
    text = the bodys text

emailwithfile

This is used to send emails with a file attached.

Requirments:
    host= SMTP address
    sender = Senders email address
    password = Senders password
    port = Senders email port address
    reciver = Who is getting the email
    title = subject line to the email.
    text = the bodys text
    filepath = the file you want to send.

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

easy_email_template-0.0.1.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

easy_email_template-0.0.1-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file easy_email_template-0.0.1.tar.gz.

File metadata

  • Download URL: easy_email_template-0.0.1.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.3

File hashes

Hashes for easy_email_template-0.0.1.tar.gz
Algorithm Hash digest
SHA256 81d3d167650dcd7c9ea1716834e7aa5b72b904497081ed0d9976f1080ccd161b
MD5 9b459e6fb61606f791a6edd8564a5fae
BLAKE2b-256 fe3daad0d7852a8fea57b271ce5cbcc64102fb52f2fb6b20716418bc4536b9fe

See more details on using hashes here.

File details

Details for the file easy_email_template-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for easy_email_template-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7cc5217d7dd4aef95a8828d8e2a68476094bc7be33a11d7067890af085b6f2da
MD5 c4fe058e54d53e6e78adbdb8a9915d11
BLAKE2b-256 ec1f26885a3618472115904353259ebcd0170dc635af494947f445729b2f236f

See more details on using hashes here.

Supported by

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