Simple tools for sending mail
Project description
PyMails
Required
Send mail
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from PyMails import *
smtp_server = ''
port = ''
sender_email = ''
password = ''
receiver_email = ''
## Html form
msg = MIMEMultipart('alternative')
msg['Subject'] = 'Test mail'
msg['From'] = sender_email
msg['To'] = receiver_email
html = open('./html/mail.html','r+').read()
msg.attach(MIMEText(html, 'html'))
## Without html form
msg = MIMEText('Test')
msg['Subject'] = 'Test mail'
msg['From'] = sender_email
msg['To'] = receiver_email
send_mail(smtp_server,port,sender_email,password,receiver_email,msg);
Connection test
connection_test(smtp_server,port,sender_email,password)
Change Log
0.0.5 (05.04.2021)
- Add connection test
0.0.1 (04.04.2021)
- First Release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
PyMails-0.0.5.tar.gz
(2.8 kB
view hashes)