Solved

xp_smtp_sendmail

Posted on 2006-06-28
7
1,277 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Creating SQL script using SQL data and SQL script 8 40
SQL Server 2012 r2 - Sum totals 2 25
create an aggregate function 9 36
date diff with Fiscal Calendar 4 31
I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
I have a large data set and a SSIS package. How can I load this file in multi threading?
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

809 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