利用PHPMailer傳送郵件時報錯

2022-03-19 20:07:26 字數 369 閱讀 2992

利用thinkphp整合phpmailer傳送郵件時報錯:failed to connect to server: unable to find the socket transport 「ssl」 – did you forget to enable it when you configured php

解決辦法:

1、既然是ssl錯誤,習慣性的從php.ini中相應行開啟支援,(extension=php_openssl.dll),伺服器是windows主機,重啟iis發現竟然還是不支援?

2、然後,在php.ini中開啟opensll擴充套件,並將php目錄下的libeay32.dll和ssleay32.dll兩個庫拷貝到system32下

接下來重啟環境。

tp 利用 phpmailer 傳送郵件

準備前提 1 開啟openssl擴充套件 php.ini或者整合環境直接開啟 composer require phpmailer phpmailer public function test else 傳送郵件方法 param string title 郵件的標題 param string con...

PHPMailer 郵件傳送

一般有兩個檔案,左邊的資料夾是包含class類檔案等,右邊就是傳送配置檔案 require phpmailer class.phpmailer.php mail new phpmailer mail issmtp mail charset utf 8 mail host smtp.qq.com 這裡...

PHPMailer 傳送郵件

上篇文章php mail 方法傳送郵件部分郵箱無法收到郵件問題 提到要介紹一下phpmailer這款免費開源的php 郵件程式,下面我們來看看吧,以下資料全部來自phpmailer官方 phpmailer 也是乙個功能強大的郵件類 phpmailer的主要功能特點 支援郵件 s mime加密的數字簽...