PDA

View Full Version : xp_sendmail


Kram
05-04-2005, 07:53 PM
i need to use the xp_sendmail stored proc, but i get the worst of formatting when i do it. Here is my command:

Exec Master.dbo.xp_sendmail
@recipients = 'email@address.com',
@query = 'Select * from table1',
@subject = 'SQL MAIL TEST',
@message = 'testing the xp_mail control',
@width = 300

the formatting i get is just bizare, there is about a million blank lines followed by heaps of dashes (----------------) etc...

any ideas?

putts
05-07-2005, 09:19 PM
well.....slight problem.....
when you call a SProc you don't define the parameters in that way (at least, I've never seen it done that way :P)

You typically just send the values in the order of the parameters like...
Exec Master.dbo.xp_sendmail 'email@address.com','Select # from table1', 'SQL MAIL TEST','testing',300


Can you try that and see if you get something different