Join David Powers for an in-depth discussion in this video Personalizing bulk mail, part of PHP Email with Swift Mailer.
- View Offline
- In the previous video we sent the same email…to multiple recipients but addressed each one individually.…Let's take that one step further by personalizing…each email.…This is Personalize.PHP which you can find in the…Chapter Five 05_02 folder of the exercise files.…At the top of the script is a multi-dimensional…array called "Recipients" with four sub-arrays.…Each sub-array has values for email, name, and greeting.…
I'm using variables for the email addresses which…I'm drawing from Config.PHP.…The information is hard-coded here, but in a real-world…application it would probably come from…a database result.…We'll use these values to personalize the same…basic message, and send it to each recipient…individually using the Swift Mailer Decorator plugin.…The plugin is part of the core Swift Mailer Library,…so there's no need to download extra files,…but to use the Decorator, the information needs…to be organized slightly differently, so we need…to create an array of replacements.…
So let's just scroll down a little bit.…
Swift Mailer is free and feature-rich, and it integrates into any web app written in PHP 5 or 7. Swift Mailer offers a flexible and elegant object-oriented approach to sending emails, including HTML email and bulk email. This PHP tutorial guides developers through the process of installing and loading Swift Mailer, and sending emails using SMTP and encrypted SMTP connections. David Powers teaches secure methods that protect users and support MIME standards. He also introduces advanced techniques for sending attachments, personalizing email, and limiting the send rate. Want to see how Swift Mailer solves a real-world programming challenge? Chapter 6 is a case study that shows how to use Swift Mailer to send an email registration form.
- What is Swift Mailer?
- Installing Swift Mailer
- Preparing basic email
- Sending email via SMTP
- Handing off emails to mail transport agents
- Sending attachments
- Sending HTML email
- Personalizing bulk mail
- Limiting the rate of sending emails