我在localhost上运行相同的php脚本 - 我的PC与XAMPP和托管服务器上运行.它适用于我的PC,但不适用于托管服务器.
当我从托管服务器发送它时,我得到以下输出:
SMTP -> ERROR: Password not accepted from server: 535 Incorrect authentication data
SMTP -> ERROR: RCPT not accepted from server: 550-Please turn on SMTP Authentication in your mail client, or login to the 550-IMAP/POP3 server before sending your message. dev.camppage.com 550-(patchvalues.com) [205.234.141.238]:50958 is not permitted to relay through 550 this server without authentication.
SMTP Error: The following recipients failed: jdorner4@gmail.com FAILED
Run Code Online (Sandbox Code Playgroud)
我怀疑有一个配置设置需要在服务器上更改,但我不知道哪一个.任何建议将不胜感激!
这是代码:
function send_gmail ($recipients, $subject, $message, $attachment_filenames = array())
{
global $email_address, $email_password, $email_name; …Run Code Online (Sandbox Code Playgroud)