Skip to main content

Pyramid integration package for marrow.mailer, formerly known as TurboMail

Project description

Pyramid integration package for "A highly efficient and modular mail delivery
framework for Python 2.6+ and 3.1+, formerly TurboMail."

Currently it must be used with ``pyramid_tm``, as ``.send()`` only works
if ``transaction``.commit() succeeded.

INSTALL
=======

::

env/bin/easyinstallpyramidmarrowmailerUSAGE=====Ifyouhavepackageinstalled,youcanconfigureitinPyramidlikealways::config.include(pyramidmarrowmailer)Allsettingsmarrow.mailerexpectsareprefixedwithmail..Ifyouwanttousedifferentprefix,setitwithpyramidmarrowmailer.prefix.Toseewhatoptionsmarrow.mailersupport,seethedocumentation<https://github.com/marrow/marrow.mailer>.Notethatbooleanoptionsneeda.onsuffix.Forexamplemail.transport.debug.on=true.Optionsthatneedtobeconvertedtointeger,addintsuffix.Forexamplemail.transport.port.int=1337.pyramidmarrowmailercallsMailer.startwhenconfig.include(pyramidmarrowmailer)iscalled.atexitisusedtoregisterMailer.stoptoshutdownwhenwsgiserverwillexit.Notethatpyramidmarrowmailersubclassesmarrow.mailer.Mailertoprovidesupportfortransaction.Classisimportablefrompyramidmarrowmailer.TransactionMailer.Youcanacccespyramidmarrowmailer.TransactionMailerinstanceintwoways::message=request.mailer.new()...message.send()Or::frompyramidmarrowmailerimportgetmailermailer=getmailer(request)message=mailer.new()...message.send()EXAMPLE=======Ifwehavepaster.inisomethinglike::mail.mode=directortransactionmail.transport.use=smtpmail.message.author=foobar@foo.comInsideaview,wecando::message=request.mailer.new()message.subject="foobar2"message.to="foobar2@bar.com"message.plain="hi"message.send()TESTING=======:: pip install nose coverage pep8 setuptools-flakes
$ ./pre-commit-check.sh
Changelog
=========


0.2 (2018-07-11)
----------------

- #2: mailer without use of transaction
[Remco Verhoef]

- #3: encoding file fix
[Sandro Nardi]

- #4: sortKey must be a string under Python 3
[nandoflorestan]


0.1 (2012-09-17)
----------------

- Initial release.
[Domen Kožar]


Supported by

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