Solved

xp_smtp_sendmail

Posted on 2006-06-28
7
1,274 Views
Last Modified: 2010-08-05
does anybody have a list of all parameters for xp_smtp_sendmail?  i'm looking all over the place, haven't yet found one.
0
Comment
Question by:dbaSQL
  • 5
7 Comments
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 150 total points
ID: 17000638
               http://www.sqldev.net/xp/xpsmtp.htm
0
 
LVL 17

Author Comment

by:dbaSQL
ID: 17000661
let me expand this question just a bit  --

i am trying to do this on a scheduled basis, sending the results in the body of an email:

EXEC master..xp_sendmail @recipients ='me@mydomain.com',
@query = 'exec db.dbo.procname ''parameter1'',''parameter2'',''parameter3'',''parameter4'',''parameter5''   ',
@subject='test',
@attach_results = 'false'

when running in QA, without @attach_results, xp_sendmail runs fine, the email was sent, but the body was blank.
so i'm not sure that it ran the @query

what am i missing?
0
 
LVL 17

Author Comment

by:dbaSQL
ID: 17000671
very good, aneeshattingal.  thank you for the parameters.  any thoughts on my bigger issue?
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 17

Author Comment

by:dbaSQL
ID: 17000698
i see @query isn't in there w/all the xp_smtp_sendmail parameters
but, xp_sendmail is fine, if i can get the proc results into the body of the email
0
 
LVL 75

Assisted Solution

by:Anthony Perkins
Anthony Perkins earned 150 total points
ID: 17003035
You need to decide which protocol you want to use xp_smtp_sendmail (SMTP) or xp_sendmail (MAPI).

And no, you cannot use xp_smtp_sendmail to send a query. It does not work that way.
0
 
LVL 17

Author Comment

by:dbaSQL
ID: 17003688
i guess I just wasn't thinking about it the right way this morning when i submitted this inquiry.  
i am using xp_smtp_sendmail in a bit of a customized by bill wunder.  (see:  http://www.sswug.org/see/15091)

i didn't know, though, that @query wasn't a parameter for xp_smtp_sendmail.  i thought surely it was available to me.
0
 
LVL 17

Author Comment

by:dbaSQL
ID: 17003715
thank you both.  i am splitting as my question was split and then answered by both of you
again, thank you both very much
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Temporarily disable SQL Replication 7 21
sql query 7 35
Date conversion in sql server 2012 6 26
select over clause 1 0
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now