ThinkSSL🔒 一键申购 5分钟快速签发 30天无理由退款 购买更放心 广告
[mail()](https://www.php.net/manual/zh/function.mail.php)函数可以让你发送邮件。 * [ezmlm\_hash](https://www.php.net/manual/zh/function.ezmlm-hash.php)— 计算 EZMLM 所需的散列值 * [mail](https://www.php.net/manual/zh/function.mail.php)(string`$收件人列表`,string`$电子邮件的主题`,string`$发送的消息`\[,string`$additional_headers`\[,string`$additional_parameters`\]\] ) :bool— 发送邮件 ``` ini_set("SMTP","smtp.example.com"); ini_set('sendmail_from','user@example.com'); ``` 例子: ``` $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 :) ```