php email related functions

伊谢尔伦
Release: 2016-11-21 17:54:48
Original
1168 people have browsed it

mail() function allows you to send emails.

In order for the right-click function to run properly, PHP must access the sendmail executable file in your system during compilation. If you use other mail programs, such as qmail or postfix, make sure they use appropriate wrappers for sendmail. PHP will first look for sendmail in your PATH variable, and then look for it in the following path: /usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib. It is highly recommended to have sendmail in your PATH variable. Furthermore, the user running the compiled PHP program must also have permission to execute sendmail.

Related functions:

ezmlm_hash — Calculate the hash value required for EZMLM

mail — Send email

Usage example:

<?php
$Name = "Da Duder"; //senders name
$email = "email@adress.com"; //senders e-mail adress
$recipient = "PersonWhoGetsIt@emailadress.com"; //recipient
$mail_body = "The text for the mail..."; //mail body
$subject = "Subject for reviever"; //subject
$header = "From: ". $Name . " <" . $email . ">\r\n"; //optional headerfields
mail($recipient, $subject, $mail_body, $header); //mail command 
?>
Copy after login


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!