Page 1 of 1

Send mail using DSExecute

Posted: Fri Oct 05, 2012 9:19 am
by sumesh.abraham
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!

Posted: Fri Oct 05, 2012 10:02 am
by ankursaxena.2003
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

Posted: Sat Oct 06, 2012 11:52 am
by bhasds
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"