网站我希望我的网站在客户单击提交按钮时自动生成发送给客户的电子邮件。
我添加了以下 php:
$subject = "Thank You";
$message = "Thank you .........";
$from = "info@mywebsite.com";
$headers = "From:" . $from;
mail($email, $subject, $message, $headers);
该变量$email
是之前定义的。我还编辑了我php.ini
的内容以包括以下内容:
SMTP = smtp.mywebsite.com
smtp_port = 25
username = info@mywebsite.com
password = password
sendmail_from = info@mywebsites.com
显然我做得还不够。我还需要做什么?