WireMailSwiftMailer by Teppo

WireMail module providing Swift Mailer integration

Swift Mailer WireMail module for ProcessWire CMF/CMS

Copyright (c) 2013-2014 Teppo Koivula

NOTE: SwiftMailer has been discontinued. This module may still work, but will no longer receive updates. It is highly recommended to move to another WireMail module, such as https://processwire.com/modules/wire-mail-smtp/.

Module version 0.3.0 dropped support to Mail transport. Please change to SMTP or Sendmail transport instead. Mail transport was removed from SwiftMailer 6.x, and thus no longer works; having it selected will fall back to PHP mail().

This module extends WireMail base class, integrating the Swift Mailer mailing library into ProcessWire.

Getting started


In order to use WireMailSwiftMailer, you'll just have to install the module and use ProcessWire's wireMail() function. For extensive instructions on that, take a look at /wire/core/Functions.php.

Though Swift Mailer supports Mail Transport, i.e. using PHP's mail(), that's not always sensible option. Real value of Swift Mailer is in it's Sendmail and SMTP Transports.

If you're a Gmail user and only need to send a few mails now and then, following DigitalOcean article is helpful for getting started with Gmail's SMTP server: https://www.digitalocean.com/community/articles/how-to-use-google-s-smtp-server

Basic usage


Basic usage is very close to how one would use PHP's native mail() function, but the order of arguments is slightly different:

$number_of_recipients = wireMail($to, $from, $subject, $body);

Like PHP's mail(), wireMail() also returns the number of recipients accepted for delivery. Note that this is not necessarily the number of recipients actually receiving your message, just the number of addresses it was sent to.

Word of warning


While this module should be fully functional, at least regarding the features it currently includes, it's also very rough, doesn't handle more complex things and definitely isn't intended for serious production use yet.

Another important thing to note is that as of this writing, WireMail is still a feature of ProcessWire's dev brach.

Swift Mailer


Swift Mailer is a powerful component based mailing library for PHP. If you want to learn more about Swift Mailer and the things it can achieve you should visit https://swiftmailer.symfony.com/docs/introduction.html.

Swift Mailer is copyright Fabien Potencier and released under the MIT license.

License


This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

(See included LICENSE file for full license text.)

Install and use modules at your own risk. Always have a site and database backup before installing new modules.

Twitter updates

  • New TinyMCE 6.2.0 Inputfield released for ProcessWire— More
    28 October 2022
  • This week we take a look at a new rich text editor for ProcessWire, why we chose it, some highlights, screenshots, and why we think you’ll like it— More
    21 October 2022
  • This week we have ProcessWire 3.0.206 on the dev branch and a new version of the ProDevTools UserActivity module, which we'll take a closer look at in this post— More
    7 October 2022

Latest news

  • ProcessWire Weekly #447
    In the 447th issue of ProcessWire Weekly we'll share the latest core updates, introduce a new third party module called RockVideoThumbnailGrabber, and more. Read on!
    Weekly.pw / 3 December 2022
  • New rich text editor for ProcessWire
    This week we take a look at a new rich text editor for ProcessWire, why we chose it, some highlights, screenshots, and why we think you’ll like it.
    Blog / 21 October 2022
  • Subscribe to weekly ProcessWire news

“To Drupal, or to ProcessWire? The million dollar choice. We decided to make an early switch to PW. And in retrospect, ProcessWire was probably the best decision we made. Thanks are due to ProcessWire and the amazing system and set of modules that are in place.” —Unni Krishnan, Founder of PigtailPundits