2016-06-20 23:56:54 +01:00
|
|
|
# sendmail
|
|
|
|
|
|
|
|
> Send email from the command line.
|
|
|
|
|
2019-02-11 18:00:49 +00:00
|
|
|
- Send a message with the content of message.txt to the mail directory of local user `user_name`:
|
2016-06-20 23:56:54 +01:00
|
|
|
|
2017-10-17 05:03:07 +01:00
|
|
|
`sendmail {{user_name}} < {{message.txt}}`
|
2016-06-20 23:56:54 +01:00
|
|
|
|
2017-10-16 22:39:44 +01: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 23:56:54 +01:00
|
|
|
|
2017-10-17 05:03:07 +01:00
|
|
|
`sendmail -f {{you@yourdomain.com}} {{test@gmail.com}} < {{message.txt}}`
|
2016-06-20 23:56:54 +01:00
|
|
|
|
2017-10-16 22:39:44 +01: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 23:56:54 +01:00
|
|
|
|
2017-10-17 05:03:07 +01:00
|
|
|
`sendmail -f {{you@yourdomain.com}} {{test@gmail.com}} < {{file.zip}}`
|