xp_sendmail attachments

  • I am trying to get xp_sendmail to send multiple attachments and can't seem to get it to work.

    The other thing that I would like to do is to check a directory, grab the listing and then email all of the files in that directory using xp_sendmail.

    Any ideas as to how to go about this?

  • do a search on xp_sendmail on MS site or in technet there is a known issue with dropped attachments. I went through that as well.


  • I checked the site, but there was nothing that actually worked.

    The problem is that when I put the files in it comes back with an error stating that it could not find the files

    ie @attachment = 'file1.txt;file2.txt'

    This is using sql7, yet there is nothing that I can find which mentions this as being an issue.

  • Have you tried including the path to each file? Just tried on my workstation at work, emailed myself autoexec.bat and boot.ini with no problem. I didnt see anything for 7.0/2000 during a quick search of MSDN either. I'd suggest you pick two files, make sure you can send each individually (to rule out typo's), then try doing both. With the paths included.

    One way to pick up the folder of files would be to shell and run dir>filelist.txt, import the file, use it with a cursor. Another way would be to use the FileSystemObject - easier in a job,but you can do it in a proc. You might want to consider if a better approach would be to zip the files, then just email the zip.


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

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