Home arrow PHP arrow Using Sendmail and Mail() with Swift Mailer

Using Sendmail and Mail() with Swift Mailer

In this third part of the series, I explain how to configure Swift Mailer to work seamlessly with the “sendmail” Unix program and the “mail()” PHP function. This process is extremely straightforward, so you shouldn’t have any trouble understanding how it functions.

TABLE OF CONTENTS:
  1. Using Sendmail and Mail() with Swift Mailer
  2. Review: using different transports to send email with Swift Mailer
  3. Using the Unix sendmail program
  4. Using the mail() PHP function
By: Alejandro Gervasio
Rating: starstarstarstarstar / 2
February 16, 2010

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

Among the great variety of PHP-based email libraries available nowadays, there's one that might be particularly attractive to you. It offers a flat learning curve and impressive features, which have been implemented by using a strict object-oriented approach.

In this specific case, of course, I'm talking about Swift Mailer, a powerful package developed by Chris Corbin that you can download at http//swiftmailer.org. It allows you to send email messages in a truly painless fashion using a myriad of SMTP transports and additional options, such as easily handling attachments, formatting messages in HTML, and much more.

So, if you're tired of using your old email libraries over and over again and want to give a face-lift to your developer's toolbox, then start learning how to put Swift Mailer to work for you.

And now that you have a clearer idea of the things that Swift Mailer can do to help you build email applications in PHP 5, it's time to review the topics that were discussed in the last tutorial. In that part of the series I explained how to utilize different SMTP transports within the same script for dispatching a basic email message by means of the "setHost()" and "setPort()" method provided by the library.

This particular example undoubtedly speaks for itself about the flexibility offered by Swift Mailer, but there are other options provided by the library that need to be explored. These include choosing which transport to use for sending email.

Thus, in this third installment of the series, I'm going to explain how to use the "sendmail" Unix application and the "mail()" PHP native function respectively with Swift Mailer, in order to create a couple of simple email scripts that you'll grasp quickly. 

Now, it's the time to continue discovering the real power of the Swift Mailer library. Let's get going!



 
 
>>> More PHP Articles          >>> More By Alejandro Gervasio
 

blog comments powered by Disqus
   

PHP ARTICLES

- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...
- PHP: Building Concrete Validators
- Sanitizing Input with PHP
- Executing Shell Commands with PHP
- Handling File Data with PHP
- File Security and Resources with PHP
- ArrayObject PHP Class Examples
- ArrayObject PHP Class: An Introduction
- Getting File System Data with PHP
- PHP Tools for Working with the File and Oper...
- Working with the File and Operating System w...
- PHP Proxy Patterns: Completing a Blog


© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 3 - Follow our Sitemap

Dev Shed Tutorial Topics: