How can i send an email through UNIX mailx command
相关问题
- Why should we check WIFEXITED after wait in order
- UNIX Bash - Removing double quotes from specific s
- How to add sender name before sender address in py
- Android: Using Intent to send email - only offerin
- Verify if an email address exists or not
相关文章
- How do I make a forward e-mail link?
- Making new files automatically executable?
- Reverse four length of letters with sed in unix
- Extracting columns from text file using Perl one-l
- Problem with piping commands in C
- Debug HTML Email in Gmail App
- Sending email using php, gmail, and swiftmailer ca
- Makefile and use of $$
-c and -b are optional.
-s : Specify subject;if subject contains spaces, use quotes.
-c : Send carbon copies to list of users seperated by comma.
-b : Send blind carbon copies to list of users seperated by comma.
Hope my answer clarifies your doubt.
Here is a multifunctional function to tackle mail sending with several attachments:
function call: enviaremail "smtp.mailserver:port" "from_address" "authuser" "'pass'" "destination" "list of attachments separated by space"
Note: Remove the double quotes in the call
In addition please remember to define externally the $titulo (subject) and $cuerpo (body) of the email prior to using the function
From the man page:
In other words, mailx reads the content to send from standard input and can be redirected to like normal. E.g.:
If you want to send more than two person or DL :
here:
an example
to send attachment
and to send attachment AND write the message body