Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Problem with xp_smtp_sendmail and attachments

Posted on 2008-06-16
3
Medium Priority
?
1,669 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 2000 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

604 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