Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Servers > BOOK: Professional IIS 8
BOOK: Professional IIS 8
This is the forum to discuss the Wrox book Professional Microsoft IIS 8 by Ken Schaefer, Jeff Cochran, Scott Forsyth, Dennis Glendenning, Benjamin Perkins; ISBN: 978-1-118-38804-4
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional IIS 8 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old December 4th, 2012, 12:14 PM
Authorized User
Join Date: Aug 2010
Posts: 11
Thanks: 2
Thanked 0 Times in 0 Posts
Send a message via AIM to rexcampbell
Default Issue with server relaying mail to a gmail or hotmail account

I was wondering if there needs to be any configuring done on IIS 8 for relaying mail from a .Net website to a client with an external site email address. I have created a website that allows potential employees to submit their information about job openings and have a confirmation email sent back to the email address they have provided. It works fine with internal addresses, but an email address from gmail, hotmail, or etc gives me an error.

I've been getting an error message {The server response was: 5.7.1 Unable to relay} and as far as I can tell through research, its not my code, but an issue on the server. I could be wrong, but if thats the case, there must be some configuration I need to do on the server and what section would it be in. Let me know if I need to provide any more information.

Old May 19th, 2013, 04:51 PM
Registered User
Join Date: Dec 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

This is not unusual. The email server, often Exchange, needs to be set to allow a relay from the email address or domain your email is being sent from by your code. Or, there is a firewall blocking your relay (less likely).

In many corporate settings, the email system is only set to accept mail from internal clients. If your email address that your code is sending from is not allowed to relay, you get this result. The setting is meant to prevent exactly what you're trying to do, allow a spoofed internal client to relay email through the server. This would allow any spam bot to send email from your corporate network, getting it blacklisted.

The solution is simple, you, or your email admin, needs to configure your email server to relay mail from your web code. Specifics depend on the server you're using, how your site/domain are configured and a number of other things, you may need to try a group that supports your mail server.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem sending email via gmail and hotmail morteza BOOK: Beginning ASP.NET 4 : in C# and VB 15 May 16th, 2010 12:02 AM
Webmail(hotmail,gmail,yahoo,ect..) contacts reader dv.rameshkumar ASP.NET 3.5 Professionals 0 May 8th, 2009 01:39 AM
help ( open mail account) merawa C# 2005 2 March 5th, 2008 11:51 AM
Open email from yahoo or hotmail server wehave74 VB How-To 1 December 23rd, 2006 04:49 AM
Encoding problem with automatic mail on hotmail robbielove ASP.NET 2.0 Professional 0 April 28th, 2006 07:48 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.