Executed xp_sendmail, said mail sent, but nothing received.
Posted on 2007-10-16
I am currently trying to run a basic command to send an email to myself based on a trigger. The code is as following:
DECLARE @SQL varchar(8000)
SET @SQL = 'USE LIVE; SELECT *
WHERE TimeChanged >= (GETDATE() - .05)'
EXEC xp_sendmail '(my email address, ommitted for privacy reasons)'
,@query = @SQL
Problem is, SQL tells me that "Mail Sent" but I receive no mail. I've tried right clicking on "Database Mail" under Management and sending a test message. This works perfectly. Anyone have any ideas as to why the test message would work but the xp won't send???