Solved

Problem with xp_smtp_sendmail and attachments

Posted on 2008-06-16
3
1,652 Views
Last Modified: 2008-06-17
I have been successful for quite a qhile using xp_smtp_sendmail to generate emails in SQL Server 2005.  Now I have tried to add an attachment to the email, and the sproc fails with this error:
Error: dumping message content to @dumpmsg DumpMsgFileLocation failed


Can anyone give me example code for xp_smtp_sendmail  with attachments that works?
0
Comment
Question by:wsturdev
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 11

Accepted Solution

by:
dready earned 500 total points
ID: 21798877
You probably know this, but it should look like this:
I've been sending attachments without any problems; unfortunately i don't know what that error message means. Is the path to the attachment a path on the server? And not on the machine from which you execute the query/stored proc?

declare @rc int
exec @rc = master.dbo.xp_smtp_sendmail
    @FROM       = N'MyEmail@MyDomain.com',
    @FROM_NAME  = N'Joe Mailman',
    @TO         = N'MyFriend@HisDomain.com',
    @CC         = N'MyOtherFriend@HisDomain.com',

    @BCC        = N'MyEmail@MyDomain.com',

    @priority   = N'HIGH',
    @subject    = N'Hello SQL Server SMTP Mail',
    @message    = N'Goodbye MAPI, goodbye Outlook',
    @type       = N'text/plain',
    @attachments= N'c:\attachment1.txt;c:\attachment2.txt',
    @server     = N'mail.mydomain.com'
select RC = @rc

go

0
 
LVL 1

Author Comment

by:wsturdev
ID: 21802110
What you are doing is exactly what I am doing.  The attachment is on the server.

What settings do you have on your server?  I suspect a server setting might be affecting me.
0
 
LVL 1

Author Comment

by:wsturdev
ID: 21802280
I went to the server, to AQL Server 2005 Surface Area Configuration and turned OFF SQL Mail.  That let the process work.  You led me to investigate that, so I am giving you the points.

But, maybe, since you have experience with attachments, you can answer a question...  I know I can place any kind of document on the server and use it as an attachment.  But how do I get it there?

I posted another question maybe you can look at:
http://www.experts-exchange.com/Microsoft/Development/MS_Access/Access_Coding-Macros/Q_23489806.html
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction Hopefully the following mnemonic and, ultimately, the acronym it represents is common place to all those reading: Please Excuse My Dear Aunt Sally (PEMDAS). Briefly, though, PEMDAS is used to signify the order of operations (http://en.…
If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question