Can anyone give an example to send a mail with an attachment

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
puli.reddy
Participant
Posts: 28
Joined: Wed Jan 11, 2006 8:29 pm
Location: Singapore
Contact:

Can anyone give an example to send a mail with an attachment

Post by puli.reddy »

Dear All,

I can send a mail with the subject and body, but I amn't aware to send a mail with an attachment through server batch jobs. Could anyone help me please!
Thnaks and Regards,
AnjiReddy.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Attachments did not work till either Ds7.5 or Ds7.5.1.
Mamu Kim
puli.reddy
Participant
Posts: 28
Joined: Wed Jan 11, 2006 8:29 pm
Location: Singapore
Contact:

Post by puli.reddy »

Thank Duke for ur information
Thnaks and Regards,
AnjiReddy.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

What version are you using? I have workarounds for both UNIX and DOS.
Mamu Kim
sudeepmantri
Participant
Posts: 54
Joined: Wed Oct 25, 2006 11:07 pm
Location: Hyderabad

Post by sudeepmantri »

Hi, the DsSendMail has got the attachment option called Attach, just like the form to subject and the body. You also can attach multiple files separated by a comma.


Syntax


DSSendMail("From:gfgjfg\nTo:gjkfg\nAttach:a1, a2\nBody:sadfsdfgsdg")
DeepakCorning
Premium Member
Premium Member
Posts: 503
Joined: Wed Jun 29, 2005 8:14 am

Post by DeepakCorning »

Also there is a Routine in Built in Category "DSSendMailAttachmentTester" and if you use the Seqeuncer the Stage "Notification_Activity" gives you an option in it to specify the attachement that ou want to send.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You'll probably find that you need to UUENCODE the attachment...
-craig

"You can never have too many knives" -- Logan Nine Fingers
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

You have to do it in a shell script. There is an example in EtlStats. The shell script is called Email.ksh. It does use uuencode.
Mamu Kim
Post Reply