公司内部的帐号发mail不存在问题,但是发到外部帐号失败。不晓得是哪里配置出了问题?
追踪的错误如下:
exec sp_ProcessResponse @conv_handle='E50A2C31-86A2-DE11-ADF6-001F29EB9E2A',@message_type_name=N'{//www.microsoft.com/databasemail/messages}SendMailStatus',@xml_message_body='<?xml version="1.0" encoding="utf-16"?>
<responses:SendMail xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.microsoft.com/databasemail/responses ResponseTypes.xsd" xmlns:responses="http://schemas.microsoft.com/databasemail/responses">
  <Information>
    <Failure Message="The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2009-09-16T14:00:16). Exception Message: Cannot send mails to mail server. (Mailbox unavailable. The server response was: 5.7.1 Unable to relay for [email protected]).&#xD;&#xA;)" />
  </Information>
  <MailItemId Id="252" />
  <SentStatus Status="3" />
  <SentAccountId Id="0" />
  <SentDate Date="2009-09-16T14:00:16" />
  <CallingProcess Id="9268" />
</responses:SendMail>
'

解决方案 »

  1.   

    看一下sql server 错误日志中提示什么。以下是配置数据库邮件的几个要点:
    1、在数据库实例--管理--数据库邮件,右键,添加配置文件和帐户,发送测试邮件,成功。 2、如果要在作业中使用数据库邮件,在sql server agent上右键,属性--警报系统,选中启用邮件配置。      该步骤比较容易遗忘,MS默认不启用。如果不启用,则操作员不会收到邮件通知,在error logs中会看到以下错误:      [264] An attempt was made to send an email when no email session has been established 3、重新启动sql server agent服务,切记。 4、作业属性--通知,选中电子邮件,选择操作员和通知条件。