无法在 codeigniter 中发送 AUTH LOGIN 命令

2024-01-07

每次我尝试发送电子邮件时都会收到一堆错误:

hello: 
The following SMTP error was encountered: 
Failed to send AUTH LOGIN command. Error: 
from: 
The following SMTP error was encountered: 
to: 
The following SMTP error was encountered: 
data: 
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.
User-Agent: CodeIgniter
Date: Sun, 1 Jul 2012 20:47:47 +0000
From: "Rapphie" 
Return-Path: 
To: [email protected] /cdn-cgi/l/email-protection
Subject: =?iso-8859-1?Q?Email_Test?=
Reply-To: "[email protected] /cdn-cgi/l/email-protection" 
X-Sender: [email protected] /cdn-cgi/l/email-protection
X-Mailer: CodeIgniter
X-Priority: 3 (Normal)
Message-ID: <[email protected] /cdn-cgi/l/email-protection>
Mime-Version: 1.0

//..

好吧,我没有看到任何问题,但实际上,也许我错过了一些大东西..这是我控制器中的内容..

$config = Array(
    'protocol' => 'smtp',
    'smtp_host' => 'smtp.googlemail.com',
    'smtp_port' => 465,
    'smtp_user' => '[email protected] /cdn-cgi/l/email-protection',
    'smtp_pass' => '****',
    'mailtype'  => 'html', 
    'charset'   => 'iso-8859-1'
);
$this->load->library('email', $config);

            $this->email->from('[email protected] /cdn-cgi/l/email-protection','Rapphie');
            $this->email->to($email,'Charmie');
            $this->email->subject('Email Test');
            $this->email->message('Testing the email class.');

            $this->email->send();

            echo $this->email->print_debugger();

我不使用“ssl://smtp.gmail.com”,因为它给了我另一个错误,如下所示:

fsockopen(): unable to connect to ssl://smtp.gmail.com:465 (Unable to find the socket transport "ssl"

try this

 $from = '[email protected] /cdn-cgi/l/email-protection';
 $to   = '[email protected] /cdn-cgi/l/email-protection';
 $subject = 'your subject';
 $message = 'your message';

 $this->load->library('email');

 $config['mailtype'] = 'html';
 $config['smtp_port']='465';
 $config['smtp_timeout']='30';
 $config['charset']='utf-8';
 $config['protocol'] = 'smtp';
 $config['mailpath'] = '/usr/sbin/sendmail';
 $config['charset'] = 'iso-8859-1';
 $config['wordwrap'] = TRUE;

 $this->email->initialize($config);
 $this->email->from($from);
 $this->email->to($to);
 $this->email->subject($subject);
 $this->email->message($message);

 // Sending Email
 $this->email->send();
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

无法在 codeigniter 中发送 AUTH LOGIN 命令 的相关文章

随机推荐

  • 什么样的工作受益于 OpenCL

    首先 我很清楚 OpenCL 并没有神奇地让一切变得更快 我很清楚 OpenCL 有局限性 现在回答我的问题 我习惯使用编程进行不同的科学计算 我处理的一些事情在计算的复杂性和数量方面非常激烈 所以我想知道 也许我可以使用 OpenCL 来
  • Tensorflow 精度/召回率/F1 分数和混淆矩阵

    我想知道是否有一种方法可以实现 scikit learn 包中的不同分数函数 如下所示 from sklearn metrics import confusion matrix confusion matrix y true y pred
  • 如何替换字符串中出现的所有特定字符?

    我正在将 csv 读入a import csv import collections import pdb import math import urllib def do work a get file c pythonwork cds
  • 如何将 DbSet 转换为 List

    鉴于以下简化的实体框架 6 上下文 我尝试使用实体填充列表 但在如何通过反射进行转换 我相信 方面遇到问题 public class FooContext DbContext public virtual IDbSet
  • NSSharingService 用于发送电子邮件并读取电子邮件正文

    我正在使用 NSSharingService 在邮件应用程序中打开一个电子邮件撰写窗口 NSSharingService sharingService NSSharingService sharingServiceNamed NSShari
  • jQuery Mobile 响应式面板和文本区域

    我有 jQuery Mobile 应用程序http gudulin ru test problem html http gudulin ru test problem html 页面加载后左侧面板打开 my panel panel open
  • 在 for 循环内分配变量

    我正在尝试一个小代码 for i 0 i lt 2 i do p i pra i done 预期输出是 必须分配变量 p0 pra0 p1 pra1 但 bash 将此作为命令 并且输出为 p0 pra0 command not found
  • 检测 Android v2 地图何时加载

    我正在编写一个应用程序 当用户按下按钮时 它会拍摄某个区域周围的 9 个地图快照 在循环中 使用它来移动和保存 map moveCamera CameraUpdateFactory newLatLngZoom new LatLng mSta
  • gpg2 导入 gpg1 密钥失败(gpg 2.1.15、Ubuntu 17.10)

    当我尝试使用 gpg2 导入导出良好的 gpg1 密钥时 公钥导入工作正常 gpg import path to publickey gpg gpg directory home me gnupg created gpg new confi
  • 如何使用使用 Java 11 的最新 SonarQube 免费版本分析 Java 8 代码? [复制]

    这个问题在这里已经有答案了 我已经使用其配置中指出的 Java 11 安装了最新版本的 SonarQube 即wrapper config 我读到它甚至可以分析用 Java 8 编写的代码 但我收到以下异常 错误 未能执行目标 org so
  • iOS 以编程方式取消 TouchID 身份验证对话框

    是否可以在之后以编程方式取消 TouchID 警报对话框LAContext evaluatePolicy称呼 如果是 怎么办 并非 Apple 发布的每个 API 都会进入developer apple com 或 Xcode 的文档查看器
  • 合并 data.frame 中的两行

    如同合并一个 data frame 中的行 https stackoverflow com questions 33285663 merge rows in one data frame and 当行不相交且包含空值时 将两行合并到一个数据
  • JPQL 类似 不区分大小写

    我想按名称搜索用户表中的数据 不区分大小写 Repository public interface UserRepository extends JpaRepository
  • Play 框架:重定向到带有参数的控制器方法

    我正在使用 PLAY 框架 2 2 1 构建一个 Web 应用程序 并尝试在地址栏中显示所请求站点的所有可用 http get 查询参数 甚至是请求中未设置的参数 在以下情况下 并非所有 http get 参数都已设置 我想使用默认值添加未
  • 如何在 Erlang 中同步使用端口?

    我想对 Erlang 中的端口进行同步调用 也就是说 将一些输入发送到通过端口连接的正在运行的操作系统进程 并直接获取其输出 而不是使用消息 有一个port call据说可以做到这一点的函数 然而 文档 https www erlang o
  • std::ifstream 明显比 FILE 慢吗?

    我被告知我的库比应有的速度慢 解析特定文件 文本文件 大小 326 kb 的速度慢了 30 倍以上 用户建议这可能是我正在使用std ifstream 大概不是FILE 我不想盲目重写 所以我想我应该先检查这里 因为我的猜测是瓶颈在其他地方
  • 使用trace显示racket中的程序

    我一直在完成 SICP 的最后几个练习第 1 章 其中几个练习使用高阶函数 目前 我正在尝试调试 1 45 解决方案中的一个问题 该问题引发了元数不匹配 产生误差的函数是对定点函数求解器两次应用平均运算的结果 这将使我的调试工作更加努力a
  • 是否可以在 Spring Boot 中在运行时构建自定义查询?

    这就是我正在努力做的事情 我有一个实体 Entity public class JobEntity Id GeneratedValue private Long id Enumerated EnumType STRING private P
  • 如何在 bash 的别名中包含环境变量?

    我对 bash 很陌生 我想包含一个 bash 别名的环境 我想做类似以下的事情 alias foo bar baz 这样我就可以做类似以下的事情 gt baz 40 gt foo 并且 foo 将扩展为命令bar 40 目前 上面的方法不
  • 无法在 codeigniter 中发送 AUTH LOGIN 命令

    每次我尝试发送电子邮件时都会收到一堆错误 hello The following SMTP error was encountered Failed to send AUTH LOGIN command Error from The fol