This article mainly shares with you how to use the mail command to send emails in Linux. I hope it can help you.
-
When I use Linux at work, I occasionally need to use the mail command to send emails.
-
From the above command, we can see that mail has been installed on the system. We also need to set up mail. , let it use an external mailbox to send emails. The setting file is /etc/mail.rc
-
I am using 163 mail, so I set the mail to use 163 agent needs to add two lines at the end of /etc/mail.rc to send emails, as follows
- ## Although we have set up Linux to use the client to send emails using 163, we still need to log in to the mailbox to set up POP3/SMTP/IMAP.
- After setting this aspect, you can use it on linux Send mail. For example, I sent one to myself for testing.
- You can see the email in the mailbox or foxmail client, indicating that the email Sent successfully.
Related recommendations:
PHP How to use PHPMailer to send emails and attachments
The above is the detailed content of How to use the mail command to send emails in Linux. For more information, please follow other related articles on the PHP Chinese website!