How to create an email file?
After the fetchmail fetches mails, the new mails are stored in a file like
/var/mail/user. We can open the file user by text editor like vim.
How can I create such text-based email files? Say, I want to send an email
with contents:
From: sender <sender@xx.com>
To: receiver <receiver@xx.com>
Subject: test subject
Contents: ...
Attached: file1.txt, file2.png, file3.pdf
The problem is how to make these to be a formal text-based email.
Besides, If I have such an email file. How can I extract files(say,
subjects, contents, attached files, etc.) by some command line tools. I
know I can open it with program like mutt. Can this be done using a
command line utility?
No comments:
Post a Comment