PHP Mail Functions Reference Guide

This reference page provides a comprehensive, alphabetical catalog of all built-in Mail Functions in PHP. In modern web development and university exams (BCA, BSc CS, B.Tech), understanding these core functions accelerates programming speed and prevents you from reinventing existing standard library tools.

Quick Tip: In modern PHP 8, you can use named arguments to specify parameters without having to memorize optional default argument positions!

Function

Description

mail.add_x_header

Add X-PHP-Originating-Script that will include UID of the script followed by the filename. For PHP 5.3.0 and above

mail.log

The path to a log file that will log all mail() calls. Log include full path of script, line number, To address and headers. For PHP 5.3.0 and above

SMTP

Windows only: The DNS name or IP address of the SMTP server

smtp_port

Windows only: The SMTP port number. For PHP 4.3.0 and above

sendmail_from

Windows only: Specifies the "from" address to be used when sending mail from mail()

sendmail_path

Specifies where the sendmail program can be found. This directive works also under Windows. If set, SMTP, smtp_port and sendmail_from are ignored

Related Reference Links & Tutorials

For in-depth practical tutorials and student code examples, explore these related classes:

Share Share on Facebook Share on Twitter Share on LinkedIn Pin on Pinterest Share on Stumbleupon Share on Tumblr Share on Reddit Share on Diggit

You may also like this!