简体   繁体   English

CodeIgniter中的AWS SMTP邮件错误(无法使用PHP SMTP发送电子邮件。您的服务器可能未配置为使用此方法发送邮件。)

[英]AWS SMTP mail error in CodeIgniter (Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.)

Am trying to send Email with AWS SMTP 我正在尝试通过AWS SMTP发送电子邮件

auth access is passed, and configured everything but still got an error from CI 传递了auth访问权限,并配置了所有内容,但仍然收到CI错误

$this->load->library("email");
$config['mailtype'] = 'html';
$config['useragent']    = 'ses-smtp-user.20160628-105419'; //origon

$config['protocol']     = 'smtp';
$config['smtp_host']    = 'email-smtp.us-west-2.amazonaws.com'; //origon

$config['smtp_user']    = 'user key ';
$config['smtp_pass']    = 'password';
$config['smtp_port']    = '465';
$config['charset']  = 'utf-8';
$config['crlf'] = "\r\n";      //should be "\r\n"
$config['newline'] = "\r\n";   //should be "\r\n"
$config['wordwrap'] = TRUE;
$config['smtp_crypto'] = 'tls'; // TLS protocol
$config['email_newline'] = "\r\n"; // SES hangs with just \n

$this->email->initialize($config);

$this->email->from("email addr",'name');
$this->email->to("mail to");

$this->email->subject("test email");
$this->email->message("test!"); //메세지
$status = $this->email->send();
if($status) echo "IT WORKED!";
print_r($this->email->print_debugger());

am not sure to change 'useragent' value 'CodeIgniter' to 'ses-smtp-user.20160628-105419' 我不确定将'useragent'值'CodeIgniter'更改为'ses-smtp-user.20160628-105419'

and got the following error using print_debugger() when im running this code 并在运行此代码时使用print_debugger()得到以下错误

hello:
The following SMTP error was encountered:

starttls:
The following SMTP error was encountered:
The following SMTP error was encountered:

Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.

Date: Wed, 20 Jun 2018 02:23:28 +0000
From: =?UTF-8?Q?=EB=B3=84=EB=AA=85?= <email>
Return-Path: <email>
To: mailto
Subject: =?UTF-8?Q?aws=20mail=20test=20mail=20f?==?UTF-8?Q?orm=20ori?= =?UTF-8?Q?gon!=20=20!?=
Reply-To: <email>
User-Agent: ses-smtp-user.20160628-105419
X-Sender: email
X-Mailer: ses-smtp-user.20160628-105419
X-Priority: 3 (Normal)
Message-ID: <email>
Mime-Version: 1.0


Content-Type: multipart/alternative; boundary="B_ALT_5b29baa048f13"

This is a multi-part message in MIME format.
Your email application may not support this format.

--B_ALT_5b29baa048f13
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

test!


--B_ALT_5b29baa048f13
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

test=21

--B_ALT_5b29baa048f13--
$config = Array(
    'protocol' => 'smtp',
    'smtp_host' => 'ssl://smtp.googlemail.com',
    'smtp_port' => 465,
    'smtp_user' => 'xxx',
    'smtp_pass' => 'xxx',
    'mailtype'  => 'html', 
    'charset'   => 'iso-8859-1'
);
$this->load->library('email', $config);
// set new line
$this->email->set_newline("\r\n");

//set to, from, message body, etc.
$result = $this->email->send();

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Codeigniter 3 无法使用 PHP ZC2239A92BDE29F0A00F9173193CC2FE 发送 email。 您的服务器可能未配置为使用此方法发送邮件 - Codeigniter 3 Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method Codeigniter:您的服务器可能未配置为使用此方法发送邮件。 无法使用 PHP SMTP 发送电子邮件 - Codeigniter: Your server might not be configured to send mail using this method. Unable to send email using PHP SMTP 无法使用 PHP SMTP 发送 email。您的服务器可能未配置为使用此方法发送邮件 - Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method 无法使用 PHP SMTP 发送电子邮件。 您的服务器可能未配置为使用此方法发送邮件 - Unable to send email using PHP SMTP. Your server might not be configured to send mail using this methods 无法发送AUTH LOGIN命令。 错误:无法使用PHP SMTP发送电子邮件。 您的服务器可能未配置为使用此方法发送邮件 - Failed to send AUTH LOGIN command. Error: Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method SMTP错误:220 smtpauth.net4india.com准备就绪无法使用PHP SMTP发送电子邮件。 您的服务器可能未配置 - SMTP error: 220 smtpauth.net4india.com ready Unable to send email using PHP SMTP. Your server might not be configured 遇到错误无法使用 PHP mail() 发送 email。 您的服务器可能未配置为使用此方法发送邮件 - An Error Was Encountered Unable to send email using PHP mail(). Your server might not be configured to send mail using this method 无法使用codeigniter发送电子邮件-错误:您的服务器可能未配置为使用此方法发送邮件 - Unable to send email using codeigniter-Error:Your server might not be configured to send mail using this method 无法使用 PHP mail() 发送电子邮件。 您的服务器可能未配置为使用此方法发送邮件 - Unable to send email using PHP mail(). Your server might not be configured to send mail using this method CodeIgniter 中的 SMTP 邮件错误:服务器可能未配置为发送邮件 - SMTP mail error in CodeIgniter : server might not be configured to send mail
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM