使用PHP從SMTP服務器發送電子郵件$from = "[email protected]";$headers = "From:" . $from;echo mail ("[email protected]" ,"testmailfunction" , "Oj",$headers);我很難用PHP發送電子郵件。我收到一個錯誤:SMTP server response: 530 SMTP authentication is required.我的印象是,你可以發送電子郵件沒有SMTP核實。我知道這封郵件很可能會被過濾掉,但這現在并不重要。[mail function]; For Win32 only.; http://php.net/smtpSMTP = localhost; http://php.net/smtp-portsmtp_port = 25; For Win32 only.;
http://php.net/sendmail-fromsendmail_from = [email protected]這是php.ini檔案。如何設置SMTP?是否有任何SMTP服務器不需要驗證,或者必須自己安裝服務器?
使用PHP從SMTP服務器發送電子郵件
慕無忌1623718
2019-06-18 11:17:23
