当前位置:网站首页>The mail command is used in combination with the pipeline command statement
The mail command is used in combination with the pipeline command statement
2022-07-06 20:31:00 【sky9899】
Operating environment :
OS: CentOS Linux release 7.9.2009 (Core)
Practical task : Send email interactively , At the same time, combined with pipeline command statements , Put the edited content with the title “ pack ”, Finally, a command is used to send the email .
[[email protected] ~] # yum install mailx
[[email protected] ~] # vi /etc/mail.rc
set bsdcompat
set from =***@163.com # Mailing address
set smtp =smtp.163.com # Send mail server
set smtp-auth-user =***@163.com # account number
set smtp-auth-password =****** # Application authorization code
set smtp-auth =login # Mail authentication method
[[email protected] ~] # yum install sendmail
[[email protected] ~] # systemctl start sendmail.service
# Use pipe sign sentences
[[email protected] ~] # echo "Content" | mail -S "Subject" ***@163.com
Non-null variable name required
Could not resolve host:
"/root/dead.letter" 10/277
. . . message not sent.
# The above error , The main reason is “=” There are spaces in the symbol
set smtp = smtp.163.com
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
- 18.
- 19.
- 20.
Summary : Do the above experiments , There are two main steps : First, install and configure mailx、sendmail service ; secondly , To be in 163 Email application to open related services , At the same time, get the authorization code .
边栏推荐
猜你喜欢
PowerPivot - DAX (first time)
Leetcode question 283 Move zero
小孩子学什么编程?
Tencent architects first, 2022 Android interview written examination summary
Force deduction brush question - 98 Validate binary search tree
2022 construction electrician (special type of construction work) free test questions and construction electrician (special type of construction work) certificate examination
5. Wireless in vivo nano network: top ten "feasible?" problem
B-jiege's tree (pressed tree DP)
Tencent T2 Daniel explained in person and doubled his job hopping salary
Basic knowledge of lists
随机推荐
2022 refrigeration and air conditioning equipment installation and repair examination contents and new version of refrigeration and air conditioning equipment installation and repair examination quest
PowerPivot - DAX (first time)
【每周一坑】信息加密 +【解答】正整数分解质因数
Catch ball game 1
Utilisation de l'écran OLED
Tencent T3 Daniel will teach you hand-in-hand, the internal information of the factory
Tencent T3 teaches you hand in hand. It's really delicious
How does kubernetes support stateful applications through statefulset? (07)
Groovy basic syntax collation
Tencent architects first, 2022 Android interview written examination summary
Crawler (14) - scrape redis distributed crawler (1) | detailed explanation
OLED屏幕的使用
What programming do children learn?
Technology sharing | packet capturing analysis TCP protocol
5. Nano - Net in wireless body: Top 10 "is it possible?" Questions
[DSP] [Part 1] start DSP learning
Notes on beagleboneblack
(work record) March 11, 2020 to March 15, 2021
看过很多教程,却依然写不好一个程序,怎么破?
SSH connection denied