You want your site's visitors to be able to contact you (to offer you work, marriage, congratulations on your genius etc) but, as soon as you put your email address on the site, you're inundated with spam and Nigerian gentlemen offering you $5 million. This tutorial shows you how to make a simple email form in PHP so that a form can be mailed to you when the user hits the submit button. Gareth then shows how to make a simple HTML mail, as well as a useful tip on how to make helpful hints appear in the status bar while the user fills in the form.
This is suitable for beginners to advanced users of PHP.
Table of Content:
- What PHP requires to send Email
- SMTP settings in the PHP.ini file
- The PHP mail() command
- Email Headers
- CC - Carbon Copy
- BCC - Blind Carbon Copy
- From - Email From Address
- X-MSMail-Priority - Message Priority (Applies to Outlook Express Only)
- X-Priority - Message Priority
- Easily Creating Email Headers
- Combining Email Headers
- Creating a Mail Form
- HTML Emails