All Projects → harel → strudelpy

harel / strudelpy

Licence: MIT license
Easy going emails with Python for easy going people, who email

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Labels

Projects that are alternatives of or similar to strudelpy

SimpleKotlinMail
A simple, coroutine based Kotlin Email API for both client- and server-side projects
Stars: ✭ 56 (+300%)
Mutual labels:  smtp
Matrix-EmailBridge
A bridge written in Golang to receive and write emails in matrix
Stars: ✭ 101 (+621.43%)
Mutual labels:  smtp
WP Mail
Send Templated emails with WordPress
Stars: ✭ 88 (+528.57%)
Mutual labels:  smtp
f3-mailer
Fat-Free Sugar Mailer Plugin
Stars: ✭ 18 (+28.57%)
Mutual labels:  smtp
share
A collection of libraries and tools written in Go.
Stars: ✭ 35 (+150%)
Mutual labels:  smtp
crystal-email
Simple e-mail sending library
Stars: ✭ 110 (+685.71%)
Mutual labels:  smtp
mailck
golang library for smtp based email validation
Stars: ✭ 53 (+278.57%)
Mutual labels:  smtp
feed2email
RSS/Atom feed updates in your email
Stars: ✭ 37 (+164.29%)
Mutual labels:  smtp
go-mail
📧 A cross platform mail driver for GoLang. Featuring Mailgun, Postal, Postmark, SendGrid, SparkPost & SMTP.
Stars: ✭ 169 (+1107.14%)
Mutual labels:  smtp
Galleon
A badass SMTP mail server built on Node to make your life simpler.
Stars: ✭ 14 (+0%)
Mutual labels:  smtp
parse-smtp-template
Parse Server Module to easy send emails via SMTP with a customizable template option
Stars: ✭ 18 (+28.57%)
Mutual labels:  smtp
email-actions
email-actions is a tiny SMTP server with a rules based engine to trigger any actions (notifications/commands etc) based on the emails sent to this server
Stars: ✭ 31 (+121.43%)
Mutual labels:  smtp
Log-mailer
Log mailer is a program I made to email log files.
Stars: ✭ 46 (+228.57%)
Mutual labels:  smtp
imail
small mail server
Stars: ✭ 88 (+528.57%)
Mutual labels:  smtp
fapro
Fake Protocol Server
Stars: ✭ 1,338 (+9457.14%)
Mutual labels:  smtp
squirrelmail
🌰️🐿️ SquirrelMail GitHub Repository (PHP 7-OK!)
Stars: ✭ 42 (+200%)
Mutual labels:  smtp
Smtp-cracker
[NEW] : Simple Mail Transfer Protocol (SMTP) CHECKER - CRACKER Tool V2
Stars: ✭ 67 (+378.57%)
Mutual labels:  smtp
gothic
🦇 Gothic is a user registration and authentication SWT/JWT microservice. It supports REST, gRPC, and gRPC Web API, reCAPTCHA & a variety of DBs with Gorm.
Stars: ✭ 65 (+364.29%)
Mutual labels:  smtp
NioSmtpClient
Smtp Client based on Netty
Stars: ✭ 25 (+78.57%)
Mutual labels:  smtp
mnm-hammer
mnm implements TMTP protocol. Let Internet sites message members directly, instead of unreliable, insecure email. Contributors welcome! (Client)
Stars: ✭ 66 (+371.43%)
Mutual labels:  smtp

StrudelPy v0.3.6

A tastier way to send emails with Python

Features

  • Attachments, multiple recipients, cc, bcc - the standard stuff
  • Embedded Images
  • Plays well with Unicode
  • Easy OOP approach
  • Supports Python 2 and 3 (with six)

Setup

pip install strudelpy

TL;DR

from strudelpy import SMTP, Email

smtpclient = SMTP('smtp.example.com', 456, 'myuser', 'muchsecret', ssl=True)
with smtpclient as smtp:
    smtp.send(Email(sender='[email protected],
                     recipients=['[email protected]', '[email protected]'],
                     subject='The Subject Matters',
                     text='Plain text body',
                     html='HTML body'))

The 'Can Read' Version

Strudelpy consists mainly of two objects: SMTP to manage connections to SMTP servers, and Email to encapsulate an email message.

SMTP

SMTP(host='some.host.com',
     port=465,
     username='username',
     password='password',
     ssl=True,
     tls=False,
     timeout=None,
     debug_level=None
)

Unless using SMTP objects with with, you'll need to login() and close() the connection.

Email

You can then send emails using the Email object:

    email = Email(sender='[email protected],
              recipients=['[email protected]', '[email protected]'],
              cc=['[email protected]'],
              bcc=['[email protected]'],
              subject='The Subject Matters',
              text='Plain text body',
              html='HTML body',
              attachments=['absolute/path/to/file'],
              embedded=['absolute/path/to/image/'])
    smtp.send(email)

Emails can use embedded images by including tags like this in the html content:

<img src="cid:filename.jpg">

Look at the tests/tests.py file for examples.

TLS Version

(v0.3.5): to configure the TLS protocol version, set an env variable EMAIL_TLS_VERSION with either PROTOCOL_TLSv1, PROTOCOL_TLSv1_1 or PROTOCOL_TLSv1_2. The default is PROTOCOL_TLSv1_2

Tests

This test suite relies on the existence of a SMTP server, real or fake to connect to. By default it will attempt to connect to a 'fake' one that can be run using:

sudo python -m smtpd -n -c DebuggingServer localhost:25

Set TEST_CONFIG_NAME to one of the keys in TEST_CONFIGURATIONS to test a specific configuration

Still to do

  • Fix tests to use a fake smtp server by default
  • Your issues???
Motivation and Similar Projects

StrudelPy was created because I needed just that kind of functionality, in that exact way. I had an itch and my searches for a scratcher did not produce anything suitable. I took some inspiration from an older similar project of mine from way back in 2007, and Pyzmail which was nice but not as simple as I'd like to have had it. However after releasing I've found out about mailthon which shares the same motives and motivation behind StrudelPy. I might have not done this had I known about Mialthon.

And by the way, StrudelPy is named after the at sign: @, which in Israel is called "The Strudel"...

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].