October 24, 2006 at 12:56 pm
Hi,
We are running SQL server 2000 SP3 on a windows 2000 server. When i am trying to run the below code in a job, i am getting the following error
Executed as user: DomainName\XXXX_SQLSRV. xp_sendmail: failed with mail error 0x80040111 [SQLSTATE 42000] (Error 18025). The step failed.
Please help me out with this error. The app team does not want to use xp_smtp_sendmail
CODE:
SET NOCOUNT ON
GO
declare @support_listvarchar(100),
@sql_servervarchar(20),
@mail_subjectvarchar(100),
@mail_messagevarchar(500)
-------------------------------------------------
-- Build support list
-------------------------------------------------
set @support_list = (select c1
from t_control
where control_type = 'SUPPORT_DAY')
set @support_list = @support_list +
(select c1
from .t_control
where control_type = 'SUPPORT_PGR_SERVER')
-------------------------------------------------
-- Server Info
-------------------------------------------------
set @sql_server = (select c1 from t_control where control_type = 'SQL SERVER')
-------------------------------------------------
set @mail_subject = @sql_server + ' Testing'
set @mail_message = @sql_server + ' Testing'
select @mail_subject
select @mail_message
select @support_list
EXEC master..xp_sendmail
@recipients = @support_list,
@subject = @mail_subject,
@message = @mail_message
October 24, 2006 at 1:32 pm
Hello,
First things first,
1. Have you configured a mail profile with the domain account that the SQL Services are getting started?
2. Have you tested to send a test mail from T-SQL?
The reason for the error is that the mail profile is not configured with the account that it need to.
Hope this helps.
Thanks
Lucky
October 24, 2006 at 2:29 pm
Hi Lucky,
Thank you for the reply. The mail profile is configured using the domail account. SQL server services and SQL server agent services are started using the same domain account.
When i tried to run the xp_sendmail from the query analyzer is am still getting
Server: Msg 18025, Level 16, State 1, Line 0
xp_sendmail: failed with mail error 0x80040111
i was simply trying to run this code
EXEC xp_sendmail @recipients = '5555555555@xxxx.com',
@message = 'The master database is full.',
@subject = 'Master Database Status'
October 24, 2006 at 9:05 pm
327552 BUG: SQL Mail Only Works From One Instance at a Time
http://support.microsoft.com/default.aspx?scid=kb;EN-US;327552
I would give a shot to delete and recreate mail profile.
October 25, 2006 at 6:56 am
Thank you for the suggestion and the article..i will try to do that
April 8, 2009 at 4:51 am
After modifying your mail profiles, you may need to issue "xp_stopmail" then "xp_startmail" from QA before the xp_sendmail will work properly.
April 18, 2011 at 8:18 am
We had a mailbox size issue in the account which was sending the emails. We had gotten a ton of "Unreachable recipient" messages. I deleted all those, then it worked fine.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply