Hi. Does anyone see a problem with the code below? When I execute that code against sqla 12, I see normal execution times, but no email is received. Thanks.
asked 09 Apr '14, 18:39
Do you actually have an email server ready to accept the email you are sending?
Is it MAPI or SMTP? (your use of xp_startmail implies "MAPI")
Are you using Microsoft Exchange?
You probably need to specify a user name.
Plus, what Volker said... check the return codes using the Super Funky Form of CALL...
DECLARE @return_code INTEGER; @return_code = CALL xp_startmail ( mail_user = @mapi_mail_username, mail_password = @mapi_mail_password ); IF @return_code <> 0 THEN ...something bad happened
And when none of that works, switch to SMTP and use Google's server :)...