Page 1 of 1

DSSendMail - Attachement - DataStage Server 7.0

Posted: Tue Sep 25, 2007 9:15 am
by caltog
Hello

I try to look for an answer in the forum but I only found for 7.5.
Is there any possibility to attach a file with DSSendmail or with Notification Activity ?

Thanks

Posted: Tue Sep 25, 2007 2:12 pm
by abhi989
two ways you can do it.

1) through unix
add an execute command activity stage in a sequence.

type as follow

Under command : /bin/ls
Under Parameters : directory_where_the_file_is; mail -s 'subject email_address_you_want_to_mail_to<full_path_to_the_location_to_the_file

2)

Add Notification Activity stage -- type necessary parameters

Posted: Tue Sep 25, 2007 5:07 pm
by ray.wurlod
Support for attachments in the Notification Activity was introduced in version 7.5. It is not available in versions earlier than this.

I can only assume (not having version 7.0 to check) that the same is true for the DSSendMail() function. However, since DSSendMail() ultimately calls the sendmail() function - the SMTP client, you could create your own mailer and invoke that from your job sequence via Execute Command.

Posted: Tue Sep 25, 2007 6:41 pm
by chulett
You can also use uuencode for the attachment file and pipe the output to a mail function like mailx for example.

D'oh! If you were on UNIX, that is. :wink:

For Windows, I'd stick with blat.

Posted: Tue Sep 25, 2007 7:10 pm
by kduke
In EtlStats there is a routine to call to send attachments using blat.exe for Windows and another using Craig's method calling a shell script named Email.ksh. Both are included in the zip file. I think both have been posted on this site.

Posted: Wed Sep 26, 2007 5:15 am
by caltog
Thanks a lot

I'll investigate yours answers.

Posted: Wed Sep 26, 2007 6:24 am
by saikir
Hi,

As stated earlier by Ray, the option to attach files is introduced in 7.5. You can use Blat for sending mails with attachments. We have been using blat succesfully in our project for some time now

Sai

Posted: Fri Oct 05, 2007 4:20 am
by caltog
It' s work with :

uuencode "FilenameWithPath" "FileNameInMail" | mailx -s "MailSubject" "Recipient"

But juste for one attached file.

Thanks