Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1293
  • Last Modified:

xp_smtp_sendmail

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
dbaSQL
Asked:
dbaSQL
  • 5
2 Solutions
 
Aneesh RetnakaranDatabase AdministratorCommented:
               http://www.sqldev.net/xp/xpsmtp.htm
0
 
dbaSQLAuthor Commented:
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
 
dbaSQLAuthor Commented:
very good, aneeshattingal.  thank you for the parameters.  any thoughts on my bigger issue?
0
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

 
dbaSQLAuthor Commented:
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
 
Anthony PerkinsCommented:
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
 
dbaSQLAuthor Commented:
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
 
dbaSQLAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now