ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
[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 :) ```