PHP Mail Function

LEVEL: Beginner

Whats in this post?

  1. Code
  2. Background and Explanation of the code

Code


To copy code: Click View Source “View Source” on the right of this code snippet.

Background and Explanation of the code

A PHP mail() function is used to send emails. mail function takes in 4 arguments;the email of recipent,subject,message and headers.Header will consist of from email and reply to along with other stuff.