[英]How to send email using XAMMP
這是我在php中發送電子郵件的代碼:
<?php
$to = 'xyz@xyz.com';
$subject = 'Customer_Details Report';
$msg="some message";
if($result)
{
echo 'your email has been sent';
}
else
{
echo'email not sent';
}
?>
如何在XAMPP中設置水銀發送郵件。
首先,您需要正確配置php.ini
和sendmail.ini
文件。
sendmail.ini
文件應包含
first smtp_server=mail.gmail.com ,
second smtp_port=465 (if not worked try 587),
third auth_username= xxx@gmail.com auth_password=yourpassword
重新啟動服務器后。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.