Send mail using DSExecute

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
sumesh.abraham
Participant
Posts: 153
Joined: Thu May 11, 2006 1:52 am
Location: Bangalore

Send mail using DSExecute

Post 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!
ankursaxena.2003
Participant
Posts: 96
Joined: Mon May 14, 2012 1:30 pm

Post 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
bhasds
Participant
Posts: 79
Joined: Thu May 27, 2010 1:49 am

Post 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"
Post Reply