Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Database Mail Error


Database Mail Error

Author
Message
mrtrich99
mrtrich99
Valued Member
Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)

Group: General Forum Members
Points: 50 Visits: 161
This is a recent install of SQL Server 2008 R2 in a Windows Server 2008 R2 64 bit environment (which I wasn't a part of). The Database Mail is enabled and I've configured a profile. I have my server's name as the Server Name for the SMTP Outgoing mail server with Port Number 25 using Anonymous Authentication. The Public Profiles checkbox is checked and set as the Default Profile, while nothing checked in Private Profiles. I send a test email by right clicking on Database Mail and never get the email. I check the sysmail_event_log and get this as the error message:

The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2012-10-19T14:23:37). Exception Message: Cannot send mails to mail server. (Mailbox unavailable. The server response was: 5.7.1 Unable to relay for testuser@company.com). )

I've tried all sorts of steps to troubleshoot this issue but everything I tried did not work. I have Norton Endpoint Protection and disabled that before sending a test email just in case Norton is blocking DB Mail. The Windows Firewall is Disabled. I changed the Profile Settings and tried checking/unchecking boxes. I even used GMail as the SMTP server by using smtp.gmail.com port 587 but I received a "time out" message.

Prior to getting this message I need help with I was getting:

The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2012-10-11T13:23:28). Exception Message: Could not connect to mail server. (No connection could be made because the target machine actively refused it "ServerIP:25"). )

But was able to get around this by installing IIS.

Any suggestions on what else I can do to troubleshoot the "Unable to Relay" issue?
DBA328
DBA328
SSC-Enthusiastic
SSC-Enthusiastic (128 reputation)SSC-Enthusiastic (128 reputation)SSC-Enthusiastic (128 reputation)SSC-Enthusiastic (128 reputation)SSC-Enthusiastic (128 reputation)SSC-Enthusiastic (128 reputation)SSC-Enthusiastic (128 reputation)SSC-Enthusiastic (128 reputation)

Group: General Forum Members
Points: 128 Visits: 1123
you may check with you Exchange Admin and make sure setup relay service in Exchange Server.

[li][/li]
mrtrich99
mrtrich99
Valued Member
Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)

Group: General Forum Members
Points: 50 Visits: 161
DBA328 (10/19/2012)
you may check with you Exchange Admin and make sure setup relay service in Exchange Server.


Do I need this server to be connected to or be part of the Exchange Server in order for DB Mail to work?
Perry Whittle
Perry Whittle
SSCrazy Eights
SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)

Group: General Forum Members
Points: 8784 Visits: 16558
mrtrich99 (10/19/2012)
The server response was: 5.7.1 Unable to relay for testuser@company.com). )
.............
...........Any suggestions on what else I can do to troubleshoot the "Unable to Relay" issue?

You're sending an email from an address not authorised on your mail server. You will need to speak to our mail server admin to identify a valid email address for your domain.

-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs" ;-)
Lowell
Lowell
SSChampion
SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)

Group: General Forum Members
Points: 14959 Visits: 38975
relaying is forwarding/sending to email addresses that are not administered by the specific server you are conecting to...for example, if my server is the google's gmail, then emails to @SqlServerCentral.com would be relayed from gmail to SSC; emails @gmail.com are on that server, and just go thru standard spam filtering before being delivered.

the default settings of any mail server are designed to prevent the server from being able to relay "spam"
to avoid all those viagra and male enhancement pills and stuff like that, a mail server is set up typically only allows relaying in two situations.

1. If using anonymous authentication, only mail coming from IP addresses already placed in the white-list get to relay; this is typically where the IP address of the webserver(or in this case, a SQL Server) has been added to the list of permitted machines. That's where you get with the administrator of the mail server, to add your IP.
A lot of times the server allows any machine on the internal LAN to relay by default.

2. instead of anonymous authentication, you use basic authentication, and provide a username and password. Because you are an actual user, In that situation, the mail server usually allows relaying. some servers require both...an account and also the IP address to be on the "white-list" of allowed machines

try switching to use a valid account first, instead of anonymous authentication. if that fails, get with your mail admin.


Lowell

--
help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

mrtrich99
mrtrich99
Valued Member
Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)

Group: General Forum Members
Points: 50 Visits: 161
i tried the googlemail way and got this error message.

The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 2 (2012-10-22T14:47:52). Exception Message: Could not connect to mail server. (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 173.194.79.16:587). )

So why is the googlemail way still erroring out? i made sure the login credentials were correct.

now, what i failed to mention about is even though this server is for one company, the mail server is on one domain while this is on a different domain. Could that be the reason why I can't send out DB mails from this server? I have not contacted anyone from tech support to see if they can include this server IP on the white list.
mrtrich99
mrtrich99
Valued Member
Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)

Group: General Forum Members
Points: 50 Visits: 161
Perry Whittle (10/20/2012)
mrtrich99 (10/19/2012)
The server response was: 5.7.1 Unable to relay for testuser@company.com). )
.............
...........Any suggestions on what else I can do to troubleshoot the "Unable to Relay" issue?

You're sending an email from an address not authorised on your mail server. You will need to speak to our mail server admin to identify a valid email address for your domain.


Hi everyone, i'm still trying to resolve this issue. I submitted a ticket to my mail server admin but have not heard back from them. Do I really need to get this server synced up with the mail server in order for it to work? I thought DB Mail in SQL 2008 can function independent without having to interact with the Outlook Exchange server?

As mentioned above using the gmail SMTP server resulted in an error for me.
Perry Whittle
Perry Whittle
SSCrazy Eights
SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)

Group: General Forum Members
Points: 8784 Visits: 16558
mrtrich99 (10/24/2012)
Perry Whittle (10/20/2012)
mrtrich99 (10/19/2012)
The server response was: 5.7.1 Unable to relay for testuser@company.com). )
.............
...........Any suggestions on what else I can do to troubleshoot the "Unable to Relay" issue?

You're sending an email from an address not authorised on your mail server. You will need to speak to our mail server admin to identify a valid email address for your domain.


Hi everyone, i'm still trying to resolve this issue. I submitted a ticket to my mail server admin but have not heard back from them. Do I really need to get this server synced up with the mail server in order for it to work? I thought DB Mail in SQL 2008 can function independent without having to interact with the Outlook Exchange server?

As mentioned above using the gmail SMTP server resulted in an error for me.

No, the google mail server will not relay mail for your domain.
Db mail merely moves the mail profile from the mail server to the sql server. You still need to route through a mail server that is authorative for your domain.

-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs" ;-)
VastSQL
VastSQL
Hall of Fame
Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)

Group: General Forum Members
Points: 3029 Visits: 5018
give server name as smtp.gmail.com and check the ssl.

Try the below link.

http://blogs.msdn.com/b/suhde/archive/2009/07/12/how-to-configure-sql-server-database-mail-to-send-email-using-your-windows-live-mail-account-or-your-gmail-account.aspx
Perry Whittle
Perry Whittle
SSCrazy Eights
SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)

Group: General Forum Members
Points: 8784 Visits: 16558
Ratheesh.K.Nair (10/25/2012)
give server name as smtp.gmail.com and check the ssl.

Try the below link.

http://blogs.msdn.com/b/suhde/archive/2009/07/12/how-to-configure-sql-server-database-mail-to-send-email-using-your-windows-live-mail-account-or-your-gmail-account.aspx

You can only route your mail through google mail or windows live if you have a gmail or live account. You will not be able to route email for dbaalerter@Fredblogs.com through the Live or Gmail servers, they will actively reject it!!!!

-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs" ;-)
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search