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.

  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



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
escort Bursa Bursa escort Antalya eskort


- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- 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...

Developer Shed Affiliates


Dev Shed Tutorial Topics: