4
其我的控制器發送郵件使用CodeIgniter
$to = "[email protected]";
$subject = "Goeboek I-Mut";
$content = "<html><body><p>Test Content</p></body></html>";
$headers = "From: [email protected]";
mail($to, $subject, $content, $headers);
這是我的php.ini
; XAMPP: Comment out this if you want to work with fakemail for forwarding to your mailbox (sendmail.exe in the sendmail folder)
sendmail_path = "\"D:\Programs\xampp\sendmail\sendmail.exe\" -t"
; XAMPP: Comment out this if you want to work with mailToDisk, It writes all mails in the D:\Programs\xampp\mailoutput folder
; sendmail_path="D:\Programs\xampp\mailtodisk\mailtodisk.exe"
這是我sendmain.ini
smtp_server=smtp.gmail.com
; smtp port (normally 25)
smtp_port=587
auth_username= [email protected]
auth_password= **
我打開我的控制器在我的瀏覽器,後加載,我刷新我的Gmail,但沒有電子郵件來..有時它發送,但經常不發送。發生什麼事?
http://stackoverflow.com/q/18180327/3282633 –
我嘗試所有的東西,它仍然是錯誤,傷心 – yudijohn
待辦事項你正確給了端口號碼?這是由服務器提供的? –