CodeIgniter版本2.1.4无法通过smtp发送Office 365的电子邮件

克里斯·穆恩奇

我正在尝试使用CodeIgniter版本2.1.4使用Office 365的SMTP服务器发送电子邮件。我知道登录正确。以下是我的配置+调试器输出。

application / config / email.php

<?php
  $config['protocol'] = 'smtp';
  $config['smtp_host'] = 'tls://smtp.office365.com';
  $config['smtp_user'] = '[email protected]';
  $config['smtp_pass'] = 'PASSWORD';
  $config['smtp_port'] = '587';
  $config['charset']='utf-8';
  $config['newline']="\r\n";
  $config['crlf'] = "\r\n";
  ?>

电子邮件调试器错误:

The following SMTP error was encountered: 0 
Unable to send data: AUTH LOGIN
Failed to send AUTH LOGIN command. Error: 
Unable to send data: MAIL FROM:
from: 
The following SMTP error was encountered: 
Unable to send data: RCPT TO:
to: 
The following SMTP error was encountered: 
Unable to send data: DATA
data: 
The following SMTP error was encountered: 
Unable to send data: User-Agent: CodeIgniter Date: Mon, 6 Apr 2015 12:19:52 -0400 From: "PHP Point Of Sale, LLC" Return-Path: To: [email protected] Subject: =?utf-8?Q?Sales_Receipt?= Reply-To: "[email protected]" X-Sender: [email protected] X-Mailer: CodeIgniter X-Priority: 3 (Normal) Message-ID: <[email protected]> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="B_ALT_5522b228bf4b9" This is a multi-part message in MIME format. Your email application may not support this format. --B_ALT_5522b228bf4b9 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit PHP Point Of Sale, LLC 123 Nowhere street 555-555-5555 Sales Receipt 04/06/2015 12:19 pm Customer: Chris Muench - Apple - 3333 Address : 6 Heron Way N Fairport NY, 14450-3318United States Phone Number : testE-Mail : [email protected] ID: POS 9 Register Name: Default Employee: John Doe Item Price Qty. Total TEST (Size) $12.00 1 $12.00   Sub Total $12.00 Total $12.00   Payment Type Cash $12.00   Change Due $0.00 Change return policy --B_ALT_5522b228bf4b9 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
卡兰·塔卡(Karan Thakkar)

尽管CI文档中未提及

smtp_crypto您可以Email.php在系统库的类中找到一个名为的配置项您的情况需要设置为tls

所以你的配置变成

$config['smtp_crypto']= 'tls'; 
$config['smtp_host'] = 'smtp.office365.com';

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

office365 的 SMTP 电子邮件

来自分类Dev

如何使用Office365 API v2搜索从授权帐户发送的电子邮件?

来自分类Dev

使用Oauth2通过Office365 C#发送电子邮件

来自分类Dev

通过Office365 smtp使用nodemailer发送电子邮件时出错(MEANjs支架)

来自分类Dev

我可以通过Office365共享邮箱发送SMTP电子邮件吗?

来自分类Dev

Office365 API:使用oauth2令牌获取当前用户的电子邮件吗?

来自分类Dev

通过Java发送电子邮件时,无法连接到SMTP主机:10.0.1.9,端口:80,响应:-1

来自分类Dev

PHP smtp.office365.com用于电子邮件

来自分类Dev

从 Wcf Windows 服务发送 Office 365 电子邮件

来自分类Dev

html电子邮件未发送codeigniter

来自分类Dev

使用codeigniter发送多封电子邮件

来自分类Dev

发送的CodeIgniter奇怪的电子邮件

来自分类Dev

CodeIgniter电子邮件发送问题

来自分类Dev

Codeigniter 同时发送单独的电子邮件

来自分类Dev

在 Codeigniter 2 中发送电子邮件时出错

来自分类Dev

无法使用Office 365 REST API登录电子邮件

来自分类Dev

无法使用CodeIgniter的电子邮件库发送电子邮件

来自分类Dev

C#使用Office365 SMTP发送电子邮件

来自分类Dev

使用smtp和Outlook.Office365.com发送电子邮件

来自分类Dev

使用 tls/ssl 使用 python 为 office365 发送 SMTP 电子邮件

来自分类Dev

PHP mail()发送2封电子邮件,而不是1封

来自分类Dev

无法在Codeigniter 3中使用SMTP gmail配置发送电子邮件

来自分类Dev

无法通过SSL通过SMTP发送电子邮件

来自分类Dev

codeigniter 多个文件归档通过电子邮件发送

来自分类Dev

无法在Codeigniter中正确发送电子邮件

来自分类Dev

为什么在CodeIgniter中无法发送电子邮件?

来自分类Dev

无法在CodeIgniter中发送电子邮件

来自分类Dev

Flask电子邮件支持-发送电子邮件时获取SSLError [Errno 1]

来自分类Dev

无法通过Indy发送电子邮件(通过GMail)。协议版本不匹配

Related 相关文章

  1. 1

    office365 的 SMTP 电子邮件

  2. 2

    如何使用Office365 API v2搜索从授权帐户发送的电子邮件?

  3. 3

    使用Oauth2通过Office365 C#发送电子邮件

  4. 4

    通过Office365 smtp使用nodemailer发送电子邮件时出错(MEANjs支架)

  5. 5

    我可以通过Office365共享邮箱发送SMTP电子邮件吗?

  6. 6

    Office365 API:使用oauth2令牌获取当前用户的电子邮件吗?

  7. 7

    通过Java发送电子邮件时,无法连接到SMTP主机:10.0.1.9,端口:80,响应:-1

  8. 8

    PHP smtp.office365.com用于电子邮件

  9. 9

    从 Wcf Windows 服务发送 Office 365 电子邮件

  10. 10

    html电子邮件未发送codeigniter

  11. 11

    使用codeigniter发送多封电子邮件

  12. 12

    发送的CodeIgniter奇怪的电子邮件

  13. 13

    CodeIgniter电子邮件发送问题

  14. 14

    Codeigniter 同时发送单独的电子邮件

  15. 15

    在 Codeigniter 2 中发送电子邮件时出错

  16. 16

    无法使用Office 365 REST API登录电子邮件

  17. 17

    无法使用CodeIgniter的电子邮件库发送电子邮件

  18. 18

    C#使用Office365 SMTP发送电子邮件

  19. 19

    使用smtp和Outlook.Office365.com发送电子邮件

  20. 20

    使用 tls/ssl 使用 python 为 office365 发送 SMTP 电子邮件

  21. 21

    PHP mail()发送2封电子邮件,而不是1封

  22. 22

    无法在Codeigniter 3中使用SMTP gmail配置发送电子邮件

  23. 23

    无法通过SSL通过SMTP发送电子邮件

  24. 24

    codeigniter 多个文件归档通过电子邮件发送

  25. 25

    无法在Codeigniter中正确发送电子邮件

  26. 26

    为什么在CodeIgniter中无法发送电子邮件?

  27. 27

    无法在CodeIgniter中发送电子邮件

  28. 28

    Flask电子邮件支持-发送电子邮件时获取SSLError [Errno 1]

  29. 29

    无法通过Indy发送电子邮件(通过GMail)。协议版本不匹配

热门标签

归档