Link to home
Start Free TrialLog in
Avatar of colin_palmer
colin_palmer

asked on

SQL sendmail error

Hi Experts,

I am getting an error message when trying to email in SQL Server.

The code im using is:

BEGIN
Exec Master.dbo.xp_sendmail 'info',
@subject = 'New Web Enquiries',
@message = @TEXT_BODY,
@attachments = '\\matrix\codex$\Website_Enquiries.doc'
END

This code is within a stored procedure and used to work before we went active directory and now im getting the following error:

Server: Msg 18025, Level 16, State 1, Line 0
xp_sendmail: failed with mail error 0x80004005

I also tried just starting and stopping the mail session but I am getting this error:

SQL Mail session started.
Server: Msg 18025, Level 16, State 1, Line 0
xp_sendmail: failed with mail error 0x8004011d
Stopped SQL Mail session.

Any Ideas?
ASKER CERTIFIED SOLUTION
Avatar of Thandava Vallepalli
Thandava Vallepalli
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
colin,

 take a look at this thread which seems to be the same problem.

https://www.experts-exchange.com/questions/21158494/SQL-Mail-Agent-Error-Trying-To-Set-Up.html