Hi All,
I am pretty new to the mail service in Sun Solaris 5.10. If anybody help me in writing a script for the multiple recipient with subject and the body would be a helpful.
Kindly help...
Thanks in advance.
Warm Regards,
Pramod
Hi All,
I am pretty new to the mail service in Sun Solaris 5.10. If anybody help me in writing a script for the multiple recipient with subject and the body would be a helpful.
Kindly help...
Thanks in advance.
Warm Regards,
Pramod
printf '%s\n' 'your mail body' | mailx -s 'your subject' 'first@address second@address ...'
Hi, Radoulov,
The below is the code which i put in the script. It ran without any error and the exit status as 0 but i didn't receive any mail on the mentioned email id. Could you please tell me what would be the problem or do i need to configure any file for the same. Kindly suggest.
Email="abc@gmail.com"
Subject="FILES STATUS"
printf '%s\n' 'FILE HAS BEEN SENT TO DMP' | mailx -s '${Subject}' '{Email}'
exit $?
Thanks in Advance
Pramod
Well, don't use single quotes around the variables as they prevent expansion. Use double quotes. And, don't forget the $ sign in front of the Email variable.
Hi All,
I am unable to send any files with the below code. If the code is ok, then how can i check whether the mail server is working or not.
Operating System : Sun Solaris 5.10
A Prompt reply would be appreciable.
Email="abc@gmail.com"
Subject="FILES STATUS"
echo "file has been sent to XYZ" | mailx -s "${Subject}" "${Email_Recipient}"
Thanks in advance.
Why don't you use the Email
variable defined?