1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/sendmail.md

16 lines
629 B
Markdown
Raw Normal View History

2016-06-20 18:56:54 -04:00
# sendmail
> Send email from the command-line.
2016-06-20 18:56:54 -04:00
- Send a message with the content of `message.txt` to the mail directory of local user `username`:
2016-06-20 18:56:54 -04:00
`sendmail {{username}} < {{message.txt}}`
2016-06-20 18:56:54 -04:00
2017-10-16 15:39:44 -06:00
- Send an email from you@yourdomain.com (assuming the mail server is configured for this) to test@gmail.com containing the message in `message.txt`:
2016-06-20 18:56:54 -04:00
2017-10-17 09:33:07 +05:30
`sendmail -f {{you@yourdomain.com}} {{test@gmail.com}} < {{message.txt}}`
2016-06-20 18:56:54 -04:00
2017-10-16 15:39:44 -06:00
- Send an email from you@yourdomain.com (assuming the mail server is configured for this) to test@gmail.com containing the file `file.zip`:
2016-06-20 18:56:54 -04:00
2017-10-17 09:33:07 +05:30
`sendmail -f {{you@yourdomain.com}} {{test@gmail.com}} < {{file.zip}}`