-1
我想從我的網站發送郵件到Gmail帳戶。看來代碼級別的一切都很好。你們可以請你看看這個問題:即使我運行這個腳本,郵件沒有收到Gmail帳戶。使用PHP發送電子郵件到Gmail帳戶
<?php
if(isset($_POST['submit'])){
ini_set('SMTP','localhost');
$msg='Name : '.$_POST['name']."\n"
.'Email : '.$_POST['email']."\n"
.'Message : '.$_POST['message'];
mail("[email protected]","Message from Contact Us",$msg);
}
else{
echo 'cannot send email';
}
?>
你在本地安裝SMTP? –
[如何使用PHP發送電子郵件?](http://stackoverflow.com/questions/5335273/how-to-send-an-email-using-php) – Robert