当前位置:网站首页>The mail function of LNMP environment cannot send mail
The mail function of LNMP environment cannot send mail
2022-07-03 14:18:00 【Brother Xing plays with the clouds】
Use LNMP Environmental Science , Test sending email in the probe , But it failed . It has been determined that mail() Function is on , So ,Google once , Found a good method ,Mark once .
The root cause of the problem
Not installed or started sendmail Components
terms of settlement
I'm a rookie , I'm not familiar with orders , So it's very detailed , Don't spray, old bird
1. reinstall sendmail Components , I use it CentOS , Use the following command to install
yum install sendmail
2. Restart with the following command php-fpm process
/etc/init.d/php-fpm restart
3. testing sendmail Whether it operates normally
/etc/init.d/sendmail status
If the display is running running Can .
Possible commands
/etc/init.d/sendmail start ( start-up sendmail)
/etc/init.d/sendmail stop ( close sendmail)
/etc/init.d/sendmail restart ( restart sendmail)
4. To configure php.ini, Fill in sendmail The absolute path of
Use the command to open edit php.ini
vi /usr/local/php/etc/php.ini
Input ?sendmail_path Find the location ( Or manually jump to find sendmail_path), You'll find that the default is the following code
;sendmail_path =
Press i Enter editor , Change this line to
sendmail_path = /usr/sbin/sendmail -t -i
Press Esc Key to exit editing , Input :wq Save and exit
5. restart php-fpm process
/etc/init.d/php-fpm restart
边栏推荐
- Understanding of closures
- Too many files with unapproved license
- 7-24 reduction of the simplest fraction (rolling Division)
- 全文检索引擎Solr系列—–全文检索基本原理
- Why are grass-roots colleges and universities with "soil and poverty" called "Northeast small Tsinghua"?
- Exercise 8-8 moving letters
- 7-9 find a small ball with a balance
- Page generation QR code
- concat和concat_ws()区别及group_concat()和repeat()函数的使用
- 6-9 statistics of single digits (15 points)
猜你喜欢

Exercise 6-2 using functions to sum special A-string sequences

Exercise 6-1 classify and count the number of characters

28: Chapter 3: develop Passport Service: 11: define attributes in the configuration file, and then obtain them in the code;

Redis: operation command of string type data

Metal organic framework MOFs loaded with non steroidal anti-inflammatory drugs | zif-8 wrapped Prussian blue loaded quercetin (preparation method)

修改数据库中的记录为什么报这个错

Leetcode(4)——寻找两个正序数组的中位数

Article content typesetting and code highlighting

TS code automatically generates JS

Cross linked cyclodextrin metal organic framework loaded methotrexate slow-release particles | metal organic porous material uio-66 loaded with flavonoid glycosides | Qiyue
随机推荐
添加Zabbix计算类型项目Calculated items
Uio-66-cooh loaded bendamostine | hydroxyapatite (HA) coated MIL-53 (FE) nanoparticles | baicalin loaded manganese based metal organic skeleton material
Article content typesetting and code highlighting
7-14 sum integer segments (C language)
npm install卡住与node-npy的各种奇怪报错
QT learning 24 layout manager (III)
Raft 协议
Facebook 如何将 Instagram 从 AWS 搬到自己的服务器
NFT新的契机,多媒体NFT聚合平台OKALEIDO即将上线
Leetcode(4)——寻找两个正序数组的中位数
Exercise 6-1 classify and count the number of characters
Find the sum of the elements of each row of the matrix
八大排序
别再问自己适不适合做软件测试了
556. 下一个更大元素 III
天图投资冲刺港股:资产管理规模249亿 投了小红书与奈雪
7-11 calculation of residential water charges by sections
MongoDB索引
Leetcode (4) -- find the median of two positively ordered arrays
JS shift operators (< <,> > and > > >)