Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

Database Mail Error Expand / Collapse
Author
Message
Posted Friday, October 19, 2012 4:03 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Tuesday, September 24, 2013 5:00 PM
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?
Post #1375052
Posted Friday, October 19, 2012 5:13 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Yesterday @ 2:23 AM
Points: 119, Visits: 1,038
you may check with you Exchange Admin and make sure setup relay service in Exchange Server.

[li][/li]
Post #1375060
Posted Friday, October 19, 2012 5:40 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Tuesday, September 24, 2013 5:00 PM
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?
Post #1375065
Posted Saturday, October 20, 2012 4:22 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 9:50 AM
Points: 6,175, Visits: 13,319
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"
Post #1375095
Posted Saturday, October 20, 2012 5:49 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 4:31 PM
Points: 12,881, Visits: 31,815
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

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #1375101
Posted Monday, October 22, 2012 3:57 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Tuesday, September 24, 2013 5:00 PM
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.
Post #1375762
Posted Wednesday, October 24, 2012 10:52 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Tuesday, September 24, 2013 5:00 PM
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.
Post #1376592
Posted Wednesday, October 24, 2012 10:59 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 9:50 AM
Points: 6,175, Visits: 13,319
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"
Post #1376595
Posted Thursday, October 25, 2012 12:08 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Thursday, July 17, 2014 6:40 AM
Points: 2,567, Visits: 3,799
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
Post #1376790
Posted Thursday, October 25, 2012 4:12 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 9:50 AM
Points: 6,175, Visits: 13,319
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"
Post #1376885
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse