Link to home
Start Free TrialLog in
Avatar of Richard Gray
Richard GrayFlag for United Kingdom of Great Britain and Northern Ireland

asked on

5.7.1 Unable to relay

We have built an application that sends an email with a pdf attachment to certain email addresses. It sends ok to internal email addresses within the organisation but when sending to an address oustide of the organisation it sends a message to the administrator as outlined below. The exchange server is set to allow relaying for all computers that authenticate (it wasnt but having looked up possible senarios yesterday on EE I tried it) The VB code seems ok & the user it is using to send the code is a named user on the exchange server & has a mailbox. If I sign on as the same user into exchange & forward it to the external address it works fine. Anyone any ideas?
Cannot email defect reminder
Mailbox unavailable. The server response was: 5.7.1 Unable to relay for whaterever address@whatever.com
   at System.Net.Mail.SmtpClient.Send(MailMessage message)
   at PPPDefects.Reminders.ReminderProcess.ExecuteReminderProcess() in C:\Documents and Settings\administrator.PANK\My Documents\Visual Studio 2008\Projects\PPPDefects\PPPDefects.Reminders\ReminderProcess.cs:line 212

Open in new window

Avatar of Rammestein
Rammestein
Flag of India image

add the public ip of the server on which the application has been installed.
in the relay tab.
Is it exchange 2003 or 2007?
Avatar of Richard Gray

ASKER

The server that the application is on does not have a public ip it is a production SQL server. Exchange server internal is 192.168.n.6  sql server is 192.168.n.11
It is exchange 2003
have u added the ip of the sql on relay radio button option.
The option should be only the list below
I have addred the IP address of the SQL server onto the allow relay list & now get:
Cannot email defect reminder
Mailbox unavailable. The server response was: 5.7.1 Unable to relay for rmvgray@hotmail.com
   at System.Net.Mail.SmtpClient.Send(MailMessage message)
   at PPPDefects.Reminders.ReminderProcess.ExecuteReminderProcess() in C:\Documents and Settings\administrator.PANK\My Documents\Visual Studio 2008\Projects\PPPDefects\PPPDefects.Reminders\ReminderProcess.cs:line 231
Wat if we telnet from the SQL to exchange on port 25 and try the same thing??
I cant remember the telnet commands once I am connected :(
Ignore that just had a refresh!
If I telnet from the SQL server to an internal address it works fine, if I send to an external address I get the 5.7.1. unable to relay
ASKER CERTIFIED SOLUTION
Avatar of Richard Gray
Richard Gray
Flag of United Kingdom of Great Britain and Northern Ireland 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