問題描述
我對亞馬遜 EC2 越來越熟悉了.我安裝了 LAMP 設(shè)置,但是當(dāng)我嘗試通過頁面中的 mail() 函數(shù)發(fā)送電子郵件時,它不起作用.我檢查過,sendmail 正在運行并且在 phpinfo 頁面上.
I am getting familiar with Amazons EC2. I installed a LAMP setup but when I try to send emails through the mail() function that I have in my pages it does not work. I checked and sendmail is running and is on the phpinfo page.
我曾嘗試更改 php.ini sendmail_from 但它什么也沒做.SMTP 端口在防火墻上是打開的...我他媽的迷路了..
I have tried changing the php.ini sendmail_from and it does nothing. SMTP port is open on the firewall... im freakin lost..
推薦答案
這不會直接解決您的問題(我的意思是您現(xiàn)在已刪除的錯誤消息),但 Amazon EC2 實例的郵件聲譽確實參差不齊.您可能會遇到可交付性問題.
This won't directly solve your issue (edit: I mean the error message you have now edited out), but Amazon EC2 instances have a really spotty mail reputation. You're probably going to have deliverability issues.
謝天謝地 Amazon 創(chuàng)建了 Simple Email Service 以配合 EC2,提供免費服務(wù)對于 EC2 客戶.API 非常簡單,并且有許多優(yōu)秀的 PHP 郵件庫的傳輸適配器,例如 SwiftMailer (transport).
Thankfully Amazon created the Simple Email Service to go along with EC2, with a free level of service for EC2 customers. The API is pretty simple and there are transport adapters for many excellent PHP mailing libraries, like SwiftMailer (transport).
這篇關(guān)于EC2 - 全新 PHP 安裝 - 郵件不起作用的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!