Loading video...
Sending Email Using PHP
- PHP provides the built-in mail() function to send email messages from scripts.
- The Simple Mail Transfer Protocol, or SMTP , is the protocol used to send and receive email messages on the Internet. It is implemented by mail servers .
- php.ini can be configured so that mail() will work in either a Windows or Linux/UNIX environment.
- When in a Windows environment, the configuration directive SMTP is typically set. When in a Linux/UNIX environment, the configuration directive sendmail_path is typically set.
- Mail servers typically require an email client to authenticate themselves before they will relay their email message to the recipient.
- fake sendmail for Windows is an application included with XAMPP that allows the sending of emails using mail() with mail servers requiring authentication.
- sendmail.ini is the fake sendmail configuration file used to specify a username and password to use for authentication.
- The additional_headers argument of mail() is used to specify who an email is from by specifying a ‘From’ header that takes on the form: 'From: email@domain.com' .
- Additional Resources:
Sending Email Using PHP
Lecture Slides are screen-captured images of important points in the lecture. Students can download and print out these lecture slide images to do practice problems as well as take notes while watching the lecture.
- Intro
- Lesson Overview
- Built-in Mail Extension
- SMTP Overview
- SMTP - Windows
- SMTP - Linux/UNIX
- Mail Configuration Directives
- Mail Server Authentication
- fake sendmail Program
- SMTP - XAMPP for Windows
- Sendmail Example
- mail() Function
- mail() Function Coding Example
- Web Application Development
- ContactUs.php
- Version 9.0 Coding Example
- Homework Challenge



































Start Learning Now
Our free lessons will get you started (Flash® 10 required).
Sign up for Educator.comGet immediate access to our entire library.
Features Overview