|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Thursday, December 10, 2009 4:18 PM
Points: 1,287,
Visits: 11
|
|
Yes, you have to have SQL Mail started prior to using xp_sendmail. You can start it through the GUI by using Enterprise Manager or you can use the T-SQL form of xp_startmail. Hope this helps. See Books Online for more specifics of xp_sendmail and xp_startmail.
Jason Delaune
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, June 13, 2006 10:02 PM
Points: 1,
Visits: 1
|
|
hmm... is there any way to send attachments with xp_sendmail? im working on an application for a call center that needs to generate info on a persons queue, dump them to an excel spreadsheet, and then send out the spreadsheets.
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Wednesday, May 08, 2013 5:12 AM
Points: 37,
Visits: 32
|
|
Guys! First of all thankx to Kunal for sharing this with us. Now, my problem:- I'm using SQL Mail to send out Emails to Customers re: outstanding Invoices. I also use SQL Mail on the same box to send out emails to our Sales Reps with summaries of outstanding invoices. Now, I've set up multiple outlook profiles on the server. I tried using
xp_startmail @user = 'CreditControlDept' xp_sendmail .... (to customers) xp_stopmail @user = 'CreditControlDept' xp_startmail @user = 'InvoiceTracker' xp_sendmail...(to internal sales reps) xp_stopmail @user = 'InvoiceTracker'
DOES NOT WORK!!! the profile does'nt switch at all. SQL Mail sends out all the emails using the profile that it started with. How can I use xp_startmail and xp_stopmail to switch between different user profiles.
Regards Uday
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, September 17, 2008 8:12 AM
Points: 3,
Visits: 3
|
|
I am a little confused the only way I got a mail session to work was to have a nt profile and outlook profile set up on the server then I was able to start the mail session. How did you get a second outlook profile to work with a different name?
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Thursday, April 10, 2003 12:00 AM
Points: 2,
Visits: 1
|
|
quote:
hmm... is there any way to send attachments with xp_sendmail? im working on an application for a call center that needs to generate info on a persons queue, dump them to an excel spreadsheet, and then send out the spreadsheets.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Thursday, April 10, 2003 12:00 AM
Points: 2,
Visits: 1
|
|
quote:
hmm... is there any way to send attachments with xp_sendmail? im working on an application for a call center that needs to generate info on a persons queue, dump them to an excel spreadsheet, and then send out the spreadsheets.
Yes, if you use @attach_results = 'TRUE', @width = 350
Also, just a thought, when creating the Excel spreadsheet, it's easier for users to open if you create a comma delimited file and use the .csv suffix.
Casey
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Wednesday, May 08, 2013 5:12 AM
Points: 37,
Visits: 32
|
|
[quote] I am a little confused the only way I got a mail session to work was to have a nt profile and outlook profile set up on the server then I was able to start the mail session. How did you get a second outlook profile to work with a different name?
Well that's my question actually...Sql BOL says I can "start" sqlmail with the "@user" argument which basically allows me to choose a different outlook profile. Query Analyzer says succesfully started and stopped with teh new profile, but, it just does'nt happen.
Regards Uday
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Monday, March 12, 2012 11:06 AM
Points: 5,
Visits: 31
|
|
Check out my problem:
http://www.sqlservercentral.com/forum/link.asp?TOPIC_ID=9937
Is there anyway to get the cursor to continue once xp_sendmail has encountered an invalid email account?
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Thursday, February 13, 2003 12:00 AM
Points: 1,
Visits: 1
|
|
quote:
What about when the email name you are retrieving from a table is no longer valid? Any ideas on error processing?
Can't quite get this part to work properly, or it works okay until the 1st illegal name is encountered then "rolls back". Then retries x number of times (something you define) and then sends the emails out again until that first illegal address is encountered. Wish xp_sendmail had error processing and was documented better.
To make a long story short, if you try to process email addresses in a table within a proc, it can't roll back xp_sendmail operations and if you have set retry option up then you get duplicate emails sent to some humorless people!
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Sunday, March 26, 2006 7:56 AM
Points: 38,
Visits: 1
|
|
Is it possible to use xp_sendmail to send html-format email? There is a message type (@type =) parameter, but where does one find info on custom message types?
|
|
|
|