Solved

Problem with xp_smtp_sendmail and attachments

Posted on 2008-06-16
3
1,654 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

As they say in love and is true in SQL: you can sum some Data some of the time, but you can't always aggregate all Data all the time! Introduction: By the end of this Article it is my intention to bring the meaning and value of the above quote to…
PL/SQL can be a very powerful tool for working directly with database tables. Being able to loop will allow you to perform more complex operations, but can be a little tricky to write correctly. This article will provide examples of basic loops alon…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

717 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