I am calling DSSendMail from routine to send mail. I see that the reply from DSSendMail is 0, but for some reason the mail is not getting sent.
I have not tried sending the mail using Notification activity.
Can anyone tell me the snippet to execute a mailx -s "Subject" "Recipient Address" using DSExecute command. Appreciate your help!
Send mail using DSExecute
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 153
- Joined: Thu May 11, 2006 1:52 am
- Location: Bangalore
-
- Participant
- Posts: 96
- Joined: Mon May 14, 2012 1:30 pm
I have not tried mail -x. But, below is the code. I am using to send out mail from unix.
Code: Select all
#Sending Mail
export MAILTO="Receipient Email Address"
export SUBJECT="Subject"
{
print - "From: Sender Name <Sender's Email Address>"
print - "To: <${MAILTO}>"
print - 'Subject:' $SUBJECT
echo "Content of the mail"
} | /usr/sbin/sendmail ${MAILTO}
exit 1
The below command can be called in execute command activity in Job Sequence
Code: Select all
mailx -s "SUBJECT" -r "senders Email ID" "recepient Email IDs"