2016-06-20 23:56:54 +01:00
|
|
|
# sendmail
|
|
|
|
|
|
|
|
> Send email from the command line.
|
|
|
|
|
|
|
|
- Send a message with the content of message.txt to the mail folder of local user `user_name`:
|
|
|
|
|
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}}`
|