Sending email with PHP: from Basic to Advanced

Learn how to send emails from your PHP website, including best practices.

4.75 (258 reviews)
Udemy
platform
English
language
Web Development
category
1,788
students
2 hours
content
Feb 2018
last update
$69.99
regular price

What you will learn

Choose the right tool for sending email with PHP

Send emails from PHP to multiple recipients

Send emails from PHP containing non-English characters

Send emails from PHP containing images and with file attachments

Use HTML and CSS in your PHP emails to add formatting and layout

Use Composer to manage third-party code packages

Create an asynchronous queue from scratch to improve browser response time when sending emails

Use the RabbitMQ messaging server to build an asynchronous email solution

Use Mailgun to send, track and receive emails

Description

Learn the basic concepts, tools and functions that you will need to send emails from your website or web application in PHP.

Learn to Send emails using PHP in this Comprehensive Course.

  • Learn basic email concepts
  • Discover the best tools and methodologies for sending emails using PHP
  • Learn best practices to make sure your emails arrive as intended
  • Improve response time in the browser by sending emails asynchronously
  • Use third-party email providers to track what happens to emails once sent

Add Sending emails to Your PHP Toolkit

If you’re creating a website or web application in PHP, sooner or later you’ll want it to send emails to your users, for example: 

  • a contact page
  • an account activation email
  • a monthly report
  • an invoice
  • a password reset email
  • a newsletter
  • email marketing

and so on.

Sending email from PHP can be a tricky thing to get right. From making sure that your email is readable in as many different email clients as possible, to sending the email asynchronously so that your website responds as quickly as possible.

This course will teach you the basics through to the advanced techniques and tools used by professional PHP programmers.

Content and Overview

I designed this course to be easily understood by programmers who know PHP, HTML and CSS but don't have much experience sending emails from PHP.

Starting with the basic concepts of how emails work, such as senders, recipients, file attachments, using HTML and CSS and so on, this course will take you through all the steps needed to have your PHP website sending emails to its users.

Once we've covered the basics, we'll move on to advanced techniques like sending emails asynchronously and tracking emails using third-party email services.

New concepts are explained in detail as and when they're introduced, with full explanations of all the code used with detailed examples.

At the end of the course, you will be able to swiftly and reliably send professional-looking emails using PHP.

Complete with working source code at every stage, you'll be able to work alongside the instructor and will receive a verifiable certificate of completion upon finishing the course.

Content

Introduction and Project Setup

Introduction
Install a Web Server on Your Computer
Change the Root Directory of the Web Server
Get Access to an SMTP Mail Server

Using PHPMailer to Send email from PHP

How NOT to Send Email in PHP
Install PHP Code Libraries Automatically with Composer
Install the PHPMailer Library with Composer
Configure PHPMailer with Your SMTP Server
Put Configuration Settings in a Separate File
Using PHPMailer to Send email from PHP

How to use PHPMailer to send emails

Send an email to one recipient
Add a Name to an email Address
Sending emails to Multiple Recipients: the Difference Between To, Cc
Send an email to Multiple Recipients using To, Cc and Bcc
Sending an email from One Address but Getting Replies to Another
Send an email with a Different Address for Replies
Send email Containing Non-English Characters
Send an email with a File Attachment
Send an email with a File Attachment and Change the Filename
How to use PHPMailer to send emails

Using HTML and CSS to add formatting to your emails

Format the Body of an email using HTML
Insert an Image into the Body of an email
Add Styles to the HTML in an email using CSS
Using HTML and CSS in emails: Online Resources that Make it Easier
Sending HTML email: Why it's Important to Send a Plain-text Version t
Add a Plain-text Version of an HTML email
Using HTML and CSS to add formatting to your emails

Sending emails asynchronously: build a basic asynchronous queue from scratch

Why it Takes a Long Time to Send an email using SMTP
Send email Quickly from a Web Page
Queue emails to be Sent Later: Save emails in Text Files
Load all Classes using Composer’s Autoloader
Send the Queued emails
Run a PHP Script Automatically at a Specified Time
Run the Queue Processing Script using cron
Sending emails asynchronously

Sending emails asynchronously using the RabbitMQ Messaging Server

Build a More Scalable Queue: Use Third-party Queue Software
Install the RabbitMQ Messaging Server
Build a More Flexible Queue: Use a Language-neutral Message Format
Install PHP Libraries for RabbitMQ and Message Pack with Composer
Create a Queue and Publish a Message to it
View the Messages on the Queue
Put the Queue Code in a Separate Class
Process the Messages on the Queue
Sending email asynchronously with RabbitMQ

Third-party email services: Using Mailgun

Sending email without SMTP: Using Mailgun
Send an email Using the Mailgun HTTP API
Track What Happens to emails Once Sent
Receive email with Mailgun
Using Mailgun

Conclusion

Conclusion
Bonus Lecture: Get discounts on my other Udemy courses

Screenshots

Sending email with PHP: from Basic to Advanced - Screenshot_01Sending email with PHP: from Basic to Advanced - Screenshot_02Sending email with PHP: from Basic to Advanced - Screenshot_03Sending email with PHP: from Basic to Advanced - Screenshot_04

Reviews

Adam
September 1, 2023
Locating the Apache configuration file used in changing the root directory was different than in the video. Once found and updated, the changes only appear to work in firefox and not the chrome browser I was using.
Vilien
September 1, 2023
Nice course! Basic mailing is covered. Also, explain the need for RabbitMQ better then 4-32hours courses.
Sebastian
January 13, 2023
Thank you so much for another part of the big puzzle... ;-) This course really is above my expectations and I appreciate the chance to get a look behind the scenes. Special thanx for the perfect friendly, reliable and competent support directly from the instructor himself. Looking forward to taking the next (already purchased) course of yours! Greetings, Sebastian
John
March 24, 2022
I struggled with this problem on my own last year and solved all the issues Dave has explained (well) so far, and a few more. Now I am looking forward to the async bit which might help me overcome some problems I am still having sending bulk emails.
Andrew
October 5, 2021
This is right on track with what I have already learned, and it uses PHPMailer which I have already started using.
Ian
November 24, 2020
Very good course if you are completely new to php email. However, there is still enough content to make it worth while for anyone who already has some knowledge in this area.
Joe
May 23, 2017
Great course! In addition to sending/receiving email with PHP, includes good overview of some flexible 3rd party services for message queing, etc. Highly recommend this course for anyone wanting to send and/or receive email in PHP apps.
James
April 14, 2017
I have always been intimidated by sending emails with php and wasn't really confident with how I was doing it. Dave shows you step by step in an easy to understand way and I am so glad I signed up for this course. It's absolutely brilliant!
Per
March 7, 2017
Packed with good information, and especially good explanations of *why* certain methods to solve a specific problem are bad or even outright dangerous. I'd love a course from daveh on the topic of doing AJAX with jQuery, because I've come to trust his expertise, and I know he takes security seriously ...and it's a topic I need a refresher on :-)
Dennis
February 16, 2017
Dave is an excellent teacher. I believe he is the most considerate instructor in Udemy. He really helps his students when they have questions or issues. And is always very prompt in answering questions to the point that I sometimes even feel guilty using up his time. After this course, I will be looking for another course he offers.
Royce
November 28, 2016
Definitely a course that worth taking your personal time to learn, if your new to php with email function. Also with a knowledgeable instructor that is patiently teaching, helping you to figure and solving out your problem. Thanks Dave!!! . *Rate five-star*
Ricardo
September 29, 2016
The instructor has a very clear pronunciation which it is perfect to understand for an not english student. Of course, the ideas are also clearly explained.!!
Jim
September 17, 2016
I recommend this course. It begins with phpMailer and concludes with very advanced methods, demonstrating a panorama of possibilities from SMTP to HTTP email. Dave packs a lot of information in each lecture. His style is more professional than conversational. He doesn't use lecture time to type code. I like to type, so I pause the video frequently and write code. If you use PHP mail() method reluctantly but haven't had the opportunity to learn a better way from a great instructor, this course might be your answer. Dave's follow up on questions is remarkable. He demonstrates his desire to help his students learn in deed, not just word.
Peter
July 22, 2016
I really enjoyed this course, really informative, up to date and to the point. Recommended to all web developers!
Joe
June 17, 2016
This is bar none the best tutorial I've found on how to properly send emails with PHP! Before this course, I was running into issues sending transactional emails from my application. About half of those emails then would never send. Besides explaining why there is a lag in sending emails, this class also exposed me to a few different better options on mitigating this issue. I ended up using his Mailgun solution. Thanks for the awesome class!

Charts

Price

Sending email with PHP: from Basic to Advanced - Price chart

Rating

Sending email with PHP: from Basic to Advanced - Ratings chart

Enrollment distribution

Sending email with PHP: from Basic to Advanced - Distribution chart

Related Topics

770526
udemy ID
2/22/2016
course created date
5/28/2019
course indexed date
Bot
course submited by