Correct Settings for using SMTP on GoDaddy?http://forums.asp.net/t/1448833.aspx/1?Correct+Settings+for+using+SMTP+on+GoDaddy+Tue, 28 Jun 2011 19:35:17 -040014488333301932http://forums.asp.net/p/1448833/3301932.aspx/1?Correct+Settings+for+using+SMTP+on+GoDaddy+Correct Settings for using SMTP on GoDaddy? <p>Hi</p> <p>I am using a e-mail form using Go Daddy Hosting mail service.</p> <p>The application works fine on my local machine but when i upload it on godaddy hosting i get exception.</p> <p><b>Exception:</b></p> <p><i>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 64.202.165.58:25<br> Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.<br> <br> Exception Details: System.Net.Sockets.SocketException: 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 64.202.165.58:25</i></p> <p><img alt="GoDaddy Mail Form Error" src="http://img442.imageshack.us/i/12482424.jpg/"><br> </p> <p><b>Code Behind file:</b></p> <p>MailMessage mail = new MailMessage();<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mail.To.Add(&quot;XXX@XXX.com&quot;);<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mail.From = new MailAddress(txtemail.Text);<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mail.Subject = &quot;XXX&quot;;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string Body = &quot;XXX&quot;;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mail.Body = Body;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mail.IsBodyHtml = true;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SmtpClient smtpClient = new SmtpClient();<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; smtpClient.Host = &quot;smtpout.secureserver.net&quot;;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; smtpClient.Credentials = new System.Net.NetworkCredential(&quot;XXX@XXX.com&quot;, &quot;Password&quot;);<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; smtpClient.Send(mail);</p> <p><br> </p> <p><b>web.config File: </b>I have added this to web.config file after &lt;/system.webServer&gt;</p> <p>&lt;system.net&gt;<br> &nbsp;&nbsp;&nbsp; &lt;mailSettings&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;smtp&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;network<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; host=&quot;smtpout.secureserver.net&quot;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; userName=&quot;XXX@XXXcom&quot;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; password=&quot;Password*&quot;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; port=&quot;25&quot;/&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/smtp&gt;<br> &nbsp;&nbsp;&nbsp; &lt;/mailSettings&gt;<br> &nbsp; &lt;/system.net&gt;</p> <p><br> </p> <p>I tried changing smtp server to relay-hosting.secureserver.net but that didnt help.</p> <p>I am using System.Net.Mail namespace<br> </p> <p>The application works smothly on my local machine but doesnt work when i upload it to my hoting server.</p> <p>The application works fine on local machine even if i dont add any code to web.config file but doesnt work on GoDaddy Windows Hosting server.<br> </p> <p>I checked lot of other post also on the same issue here but none helped.</p> <p>I have e-mail the tech support of GoDaddy also but no reply yet.<br> </p> <p><br> </p> 2009-07-19T06:31:58-04:003301995http://forums.asp.net/p/1448833/3301995.aspx/1?Re+Correct+Settings+for+using+SMTP+on+GoDaddy+Re: Correct Settings for using SMTP on GoDaddy? <p>Hello,</p> <p>Use the following relay server&nbsp;- <strong>relay-hosting.secureserver.net</strong> </p> <p>You do not need to provide a user name and password for this relay server.&nbsp;</p> <p>Regards</p> 2009-07-19T08:00:54-04:003302199http://forums.asp.net/p/1448833/3302199.aspx/1?Re+Correct+Settings+for+using+SMTP+on+GoDaddy+Re: Correct Settings for using SMTP on GoDaddy? <p>Thank You.<br> <br> 2 things i was doing wrong<br> <br> <br> 1) use relay-hosting.secureserver.net<br> 2) From e-mail address has to be a address from ur hosting account.</p> 2009-07-19T13:49:47-04:003344786http://forums.asp.net/p/1448833/3344786.aspx/1?Re+Correct+Settings+for+using+SMTP+on+GoDaddy+Re: Correct Settings for using SMTP on GoDaddy? <p>I am also getting same problem,</p> <p>Email coding working well in Local Host but it not working in godaddy hosting,Please guide me what I have to do?can you Please send me the Codebehind and webconfig coding.</p> 2009-08-13T01:27:16-04:003345351http://forums.asp.net/p/1448833/3345351.aspx/1?Re+Correct+Settings+for+using+SMTP+on+GoDaddy+Re: Correct Settings for using SMTP on GoDaddy? <p>If you have the same with your web hosting company like OP has I assume you need to get in touch with them and ask for the help. I assume with godaddy that would be quite difficult&nbsp; to do <br> </p> 2009-08-13T07:43:17-04:003350374http://forums.asp.net/p/1448833/3350374.aspx/1?Re+Correct+Settings+for+using+SMTP+on+GoDaddy+Re: Correct Settings for using SMTP on GoDaddy? <p>You may need to check that the website IP address is white listed on GD's mail servers. You could also just use something like google's mail server to send using an authenticated account.<br> </p> 2009-08-16T17:31:32-04:003357196http://forums.asp.net/p/1448833/3357196.aspx/1?Re+Correct+Settings+for+using+SMTP+on+GoDaddy+Re: Correct Settings for using SMTP on GoDaddy? <p>I have posted the solution on my blog <a href="http://jamboreebliss.com/blog/?p=72"> http://jamboreebliss.com/blog/?p=72</a> </p> <p>&nbsp;</p> <pre class="prettyprint">MailMessage mail = new MailMessage(); mail.To.Add(XXX@XXX.com); mail.From = new MailAddress(txtemail.Text); mail.Subject = XXX; string Body = XXX; mail.Body = Body; mail.IsBodyHtml = true; SmtpClient smtpClient = new SmtpClient(); smtpClient.Host = relay-hosting.secureserver.net; smtpClient.Credentials = new System.Net.NetworkCredential(XXX@XXX.com, Password); smtpClient.Send(mail);</pre> <p><strong>PS:</strong> The from e-mail address has to be a valid godaddy.com(hosting account) e-mail address.</p> 2009-08-19T19:48:43-04:003651616http://forums.asp.net/p/1448833/3651616.aspx/1?Re+Correct+Settings+for+using+SMTP+on+GoDaddy+Re: Correct Settings for using SMTP on GoDaddy? <p>I see here and in alot of other forums that the GoDaddy SMTP Relay-host MUST have the email.FROM address as a registered GoDaddy (White Listed) email address.</p> <p><br> </p> <p>That doesn't help if you're trying to set up a ContactUs web page, so that an imail comes into your inbox as follows:</p> <p>FROM: unknown email address</p> <p>TO: my goDaddy email Account</p> <p>I am also trying to use the smtp.gmail.com as a fall back, but finding that gmail swaps out the FROM email address with the gmail smtp credential email address (loosing the Senders email address).&nbsp; </p> <p>Any Ideas?</p> <p>www.earthed.net.au<br> </p> <p>(I am trying to do something very similar to : http://www.4guysfromrolla.com/articles/072606-1.aspx )<br> </p> 2010-01-31T21:53:00-05:003651679http://forums.asp.net/p/1448833/3651679.aspx/1?Re+Correct+Settings+for+using+SMTP+on+GoDaddy+Re: Correct Settings for using SMTP on GoDaddy? <p></p> <blockquote><span class="icon-blockquote"></span> <h4>Earthed</h4> I see here and in alot of other forums that the GoDaddy SMTP Relay-host MUST have the email.FROM address as a registered GoDaddy (White Listed) email address.</blockquote> &nbsp; <p></p> <p>&nbsp;</p> <p>not true, i use e-mail addresses from other providers and it works just fine on godaddy</p> <p>&nbsp;</p> <p></p> <blockquote><span class="icon-blockquote"></span> <h4>Earthed</h4> <p>That doesn't help if you're trying to set up a ContactUs web page, so that an imail comes into your inbox as follows:</p> <p>FROM: unknown email address</p> <p>TO: my goDaddy email Account</p> <p></p> </blockquote> <p></p> <p>set from and to to the same e-mail, and add reply-to: unknow e-mail/customer e-mail. That way when you clik reply you will send e-mail to customer who asked question on your site..</p> <p></p> 2010-01-31T23:07:01-05:003652088http://forums.asp.net/p/1448833/3652088.aspx/1?Re+Correct+Settings+for+using+SMTP+on+GoDaddy+Re: Correct Settings for using SMTP on GoDaddy? <p></p> <blockquote><span class="icon-blockquote"></span> <h4>Earthed</h4> <p></p> <p>I see here and in alot of other forums that the GoDaddy SMTP Relay-host MUST have the email.FROM address as a registered GoDaddy (White Listed) email address.</p> <p></p> </blockquote> <p></p> <p>I use Godaddy.</p> <p>During Authentication SMTP Credentials have to be valid GoDaddy hosting account email ID and password or&nbsp; You can use any other service provider e-mail also.</p> <p><br> </p> <pre class="prettyprint">MailMessage mail = new MailMessage(); mail.To.Add(&quot;AnyEmailAddress&quot;); mail.From = new MailAddress(&quot;anyEmailAddress&quot;); smtpClient.Credentials = new System.Net.NetworkCredential(&quot;GodaddyAddress&quot;, &quot;GodaddyPassword&quot;);</pre> <p><br> But in PHP mail form either one of the e-mail address has to be Godaddy e-mail addres but if u r using ASP.net(C#) that is not the case.<br> </p> <p>Just follow the code shown in above post and it should work fine.&nbsp; u will need to add reference to System.Net.Mail<br> </p> <p><br> </p> 2010-02-01T05:12:46-05:004482296http://forums.asp.net/p/1448833/4482296.aspx/1?Re+Correct+Settings+for+using+SMTP+on+GoDaddy+Re: Correct Settings for using SMTP on GoDaddy? <h2>I am getting this error when i use relay-hosting.secureserver.net with user name and password provided by godaddy</h2> <h2><i>Mailbox name not allowed. The server response was: sorry, your mail was administratively denied. (#5.7.1)</i></h2> 2011-06-28T19:35:17-04:00