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 intexec @rc = master.dbo.xp_smtp_sendmail @FROM = Nemail@example.com', @FROM_NAME = N'Automated Email', @TO = Nfirstname.lastname@example.org', @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