troubleshooting Question

Performance Issue with XP_SMTP_SENDMAIL

Avatar of meteorelec
meteorelecFlag for Ireland asked on
Microsoft SQL Server
3 Comments1 Solution449 ViewsLast Modified:
It takes 15sec to send a single email using this stored procedure,
i'm looking to send out over 2000 emails using a cursor,
This would take over 8hours,
whilst with the xp_sendmail its practically instant,
Can you see why this would be?
I've attach my code below (i am sending from my exchange server on my network)
 
declare @rc int
exec @rc = master.dbo.xp_smtp_sendmail
	@FROM			= N'autoemail@meteorelectrical.com',
	@FROM_NAME		= N'Automated Email',
	@TO			= N'eoin.conway@meteorelectrical.com',
	@subject		= N'Hello HTML SQL Server SMTP Mail',
	@message		= N'<HTML><H1>this is some content for the body part object</H1></HTML>',
	@type			= N'text/html',
	@server 		= N'EXCHANGESRV'
select RC = @rc
ASKER CERTIFIED SOLUTION
kenpem

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros