Mailing File

  • My aim is to pick up a file from a network server and then mail it to an external email address.

    1) File is created and put on a networked drive.

    2) DTS Package looks at file on networked drive.

    3) Package picks up file and mails it to relevant persons.

    Is this possible??

    Your help would be much appreciated!!

  • Yes it is possible. You might need to map the network dirve. Use sendMail task of DTS or XP_Sendmail sp.

    If you have relevant persons of some windows group, you can write an SP to get user names belong to specific domain/group and e-mail your file to them.

  • How do i do this Ash, what would be my procedure in producing this package....I know about XP_Sendmail sp, I have used this before, but how would i go about actually doing it.?..Im not used to the SendMail task in DTS.

    Any help would be much appreciated..

  • Look into BOL for XP_SendMail. There is a parameter for attachment. Just give your file name (complete path) to this. in @recipients parameter write e-mail id whom u want to send the file to.

     

    Some thing like this;

    exec master..xp_sendmail @recipients = 'abc@xyz.com

        ,@attachments ='x:\filename.txt'

  • Works a treat Anil.  Thank You...

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply