绿站
绿色文摘
今天是:

交流 | 搜索 | +发贴

WordPress纯代码免插件配置SMTP邮件功能
nydalu 2024年5月28日 389次

目前很多虚拟主机基本都是禁用了mail函数的,所以我们只能使用SMTP服务发送邮件,网上关于STMP的WordPress插件有很多,将下面代码修改后复制到functions.php文件,再测试发送邮件功能。

//WordPress免插件配置SMTP邮件
function mail_smtp( $phpmailer )
{
$phpmailer->FromName = \’生存无忧\’; //发件人名称
$phpmailer->Host = \’smtp.qq.com\’; //修改为你使用的邮箱SMTP服务器
$phpmailer->Port = 465; //SMTP端口
$phpmailer->Username = \’k1510@qq.com\’; //邮箱账户
$phpmailer->Password = \’*****\’; //邮箱授权码(此处填写QQ邮箱生成的授权码)
$phpmailer->From = \’k1510@qq.com\’; //邮箱账户
$phpmailer->SMTPAuth = true;
$phpmailer->SMTPSecure = \’ssl\’; //tls or ssl (port=25时->留空,465时->ssl)
$phpmailer->IsSMTP();
}
add_action(\’phpmailer_init\’, \’mail_smtp\’);


  • drover sointeru 25-01-01 18:21  

    Heya i’m for the first time here. I found this board and I find It really useful & it helped me out a lot. I hope to give one thing back and aid others such as you aided me.

    https://www.droversointeru.com


  • https://Menbehealth.wordpress.com/ 25-03-27 00:43  

    I drop a leave a response each time I appreciate a poist on a site or if I
    have somethihg to add to the discussion. It’s a result of the passion communicated
    in the post I read. And on this article WordPress纯代码免插件配置SMTP邮件功能 –
    绿站. I was actually moved enough to drop a comment 😉 I
    do have 2 questions for you if it’s allright. Is it just mee or do some of theese responses come across as if they are coming from
    brain dead visitors? 😛 And, if you are posting
    at additional social sites, I would like to fokllow you.
    Woild you list the complete urls of all your community
    pages like your Facebook page, twitter feed, or linkedin profile? https://Menbehealth.wordpress.com/


  • 📑 + 1.325473 BTC.GET - https://graph.org/Message--120154-03-25?hs=4dde8ed13d434561740f485109f1356b& 📑 25-04-02 18:16  

    vm9u1b


  • droversointeru 25-04-10 22:40  

    I couldn’t resist commenting

    https://www.droversointeru.com


  • 📎 Message; SENDING 1.674826 BTC. Get =>> https://graph.org/Ticket--58146-05-02?hs=4dde8ed13d434561740f485109f1356b& 📎 25-05-13 20:01  

    esl2ms


  • 📇 + 1.530410 BTC.GET - https://yandex.com/poll/T1TnDbUc4R9aLX7Nzhj1Cy?hs=4dde8ed13d434561740f485109f1356b& 📇 25-05-19 01:32  

    m9mhzu


  • zoritoler imol 25-05-21 08:26  

    As I website possessor I conceive the subject matter here is really fantastic, thanks for your efforts.

    https://www.zoritolerimol.com


  • 🔏 + 1.136459 BTC.GET - https://graph.org/Payout-from-Blockchaincom-06-26?hs=4dde8ed13d434561740f485109f1356b& 🔏 25-07-07 00:01  

    vr5e87


  • 🔊 Notification; + 1.79720 BTC. Receive > https://graph.org/Payout-from-Blockchaincom-06-26?hs=4dde8ed13d434561740f485109f1356b& 🔊 25-07-11 11:30  

    0a15y6


  • Cody 25-07-16 05:10  

    Good shout.


  • Geneva 25-07-18 07:40  

    Nice

    Take a look at my web page: snow caps strain


  • Harriett 25-07-18 20:19  

    live resin area 52


  • Jeannette 25-07-18 21:28  
  • Margarette 25-07-18 21:55  

    hybrid carts area 52


  • Dee 25-07-18 21:56  
  • Sherry 25-07-18 21:58  

    thca diamonds area 52


  • Ruben 25-07-18 22:52  
  • Zoe 25-07-18 23:14  

    hybrid gummies area 52


  • ⌨ Email: + 1.498210 BTC. Receive => https://graph.org/Payout-from-Blockchaincom-06-26?hs=4dde8ed13d434561740f485109f1356b& ⌨ 25-07-20 10:35  

    czcnik


  • 📻 Notification: SENDING 1,170157 bitcoin. Go to withdrawal =>> https://graph.org/Payout-from-Blockchaincom-06-26?hs=4dde8ed13d434561740f485109f1356b& 📻 25-07-20 19:17  

    7duc0p


  • 🖊 🎁 Bitcoin Offer: 0.25 BTC credited. Claim today >> https://graph.org/WITHDRAW-YOUR-COINS-07-23?hs=4dde8ed13d434561740f485109f1356b& 🖊 25-07-24 10:26  

    ac0nyf


  • 🖊 ⚠️ ATTENTION: You were sent 3.0 BTC! Tap to accept > https://graph.org/RECEIVE-BTC-07-23?hs=4dde8ed13d434561740f485109f1356b& 🖊 25-07-28 16:53  

    nb89eh


  • 📈 🔔 Notification: 1.6 BTC waiting for transfer. Proceed → https://graph.org/EARN-BTC-INSTANTLY-07-23?hs=4dde8ed13d434561740f485109f1356b& 📈 25-08-14 06:54  

    xpwm27


  • 🔏 ⚠️ Verification Needed: 1.3 Bitcoin transfer blocked. Resolve now → https://graph.org/ACQUIRE-DIGITAL-CURRENCY-07-23?hs=4dde8ed13d434561740f485109f1356b& 🔏 25-08-14 11:52  

    hixwn2


  • 🔧 ⚡ Fast Deposit: 1.9 Bitcoin processed. Confirm now > https://graph.org/GET-FREE-BITCOIN-07-23?hs=4dde8ed13d434561740f485109f1356b& 🔧 25-08-28 14:53  

    l6uyib


  • Hattie 25-08-29 07:25  
  • 🔗 💎 BTC Offer: 0.25 BTC reserved. Get now > https://graph.org/WITHDRAW-YOUR-COINS-07-23?hs=4dde8ed13d434561740f485109f1356b& 🔗 25-08-31 01:32  

    7qjenw


  • 📃 🚨 Urgent - 0.8 BTC transfer canceled. Resend now => https://graph.org/RECOVER-BITCOIN-07-23?hs=4dde8ed13d434561740f485109f1356b& 📃 25-08-31 15:40  

    jrb3xa


  • 📢 🎁 Limited Deal: 1.25 BTC bonus available. Activate today >> https://graph.org/WITHDRAW-DIGITAL-FUNDS-07-23?hs=4dde8ed13d434561740f485109f1356b& 📢 25-09-01 00:53  

    ytifen


  • 🔨 🎁 BTC Bonus: 0.5 BTC reserved. Claim today >> https://graph.org/Get-your-BTC-09-04?hs=4dde8ed13d434561740f485109f1356b& 🔨 25-10-08 17:36  

    r24rq2


  • 🔑 ⚡ Quick Transaction: 2.1 BTC received. Confirm here >> https://graph.org/Get-your-BTC-09-04?hs=4dde8ed13d434561740f485109f1356b& 🔑 25-10-11 12:30  

    4l8uon


  • 🔋 🔄 Crypto Deposit - 2.4 BTC unclaimed. Go to receive >> https://graph.org/Binance-10-06-3?hs=4dde8ed13d434561740f485109f1356b& 🔋 25-10-30 12:07  

    bekq3q



  • 关于 ·登录·管理
    加载1.985 查询 16