Mailtools

Software Screenshot:
Mailtools
Software Details:
Version: 2.1
Upload Date: 14 Apr 15
Developer: Oliver Cope
Distribution Type: Freeware
Downloads: 84

Rating: 5.0/5 (Total Votes: 2)

Writing a web application? Want to send some emails from it? Mailtools is an application that can help you with that!

* Simple API for sending plain text messages, HTML and messages with attachments.
* ThreadedMailer sends emails in the background and returns control to your application immediately, even when talking to slow remote servers.
* Temporary sending failures are automatically retried.
* Running your application in test mode? The RedirectMessages wrapper routes emails to a test address and not to live email addresses.

Usage:

Creating a simple SMTP mailer:

from mailtools import SMTPMailer
mailer = SMTPMailer('127.0.0.1')


This mailer will block until messages are sent and won't retry failures. Use ThreadedMailer to fix this:

mailer = ThreadedMailer(SMTPMailer('127.0.0.1'))

Sending a plain text message:

message = u'This is a plain text message'
mailer.send_plain(
 u'sender@example.com',
 [u'recipient@example.com'],
 u'hi',
 message
)


Sending an HTML message:

message = u'Look! HTML!'
mailer.send_html(
 u'sender@example.com',
 [u'recipient@example.com'],
 u'hi',
 message
)


Adding attachments:

message = u'index.rst is attached to this message'
mailer.send_plain(
 u'sender@example.com',
 [u'recipient@example.com'],
 u'hi',
 message,
 attachments=['index.rst']
)

Requirements:

  • Python

Similar Software

mboxpurge
mboxpurge

11 May 15

Exim
Exim

1 Dec 17

WebMail
WebMail

3 Jun 15

RoundCube Webmail
RoundCube Webmail

16 Aug 18

Other Software of Developer Oliver Cope

frescoext-genshi
frescoext-genshi

20 Feb 15

Swab
Swab

20 Feb 15

Fresco
Fresco

10 Dec 15

Comments to Mailtools

Comments not found
Add Comment
Turn on images!