Correct Settings for using SMTP on GoDaddy?

Last post 04-20-2008 5:26 PM by KautenEffects. 36 replies.

Sort Posts:

  • Re: Correct Settings for using SMTP on GoDaddy?

    03-31-2008, 12:07 AM

    I am not saying you write bad code or anything, but more simply that I too have had several projects that would work perfectly on other servers and such but then not work with GoDaddy because of a combination of their security configurations and/or certain workarounds that have the be implemented to work with their systems.

    Is your friend's server on GoDaddy's network, or is it something he runs on his own or with a different host?
     

    Geoff Kauten
    www.KautenEffects.com
  • Re: Correct Settings for using SMTP on GoDaddy?

    03-31-2008, 12:21 AM

    Different host altogether ...

    Greg

  • Re: Correct Settings for using SMTP on GoDaddy?

    03-31-2008, 2:28 AM

    Hi Greg,

    I was involved with this post a long while ago so I still get the emails.

    I have a Windows Hosting Plan with godaddy and it works fine now.

    It used to take up to half an hour but these dqays it takes only seconds. Maybe I changed the code along the way.

    Anyway, I'll show you what I have and maybe it'll work for you.

    It's C#...

     

     

    In the following, there will be two email addresses mentioned.

    My email address, which I'm sending from, which belongs to the domain that it hosted, which I call myemal@mysite.com and the password for this email, which I call "mypassword".

    Also, the email address I'm sending the email to, which I'll call rxemail@clientsite.com.

     

    In my web.config file, which is in the root of my application, i.e. same folder as my default.aspx file, I have the following:

     

      <system.net>
        <mailSettings>
          <smtp>
            <network
                 host="relay-hosting.secureserver.net"
                 userName="myemail@mysite.com"
                 password="mypassword" />
          </smtp>
        </mailSettings>
      </system.net>

    And the code I use to send the email is as follows:

                  MailMessage mailMsg = new MailMessage("myemail@mysite.com", "rxemail@clientsite.com");
                  mailMsg.Subject = "hello from my site to yours";
                  mailMsg.Body = "bla bla bla" + DateTime.Now.ToString();
                  mailMsg.IsBodyHtml = false;
                  SmtpClient smtp = new SmtpClient();
                  smtp.Host = "relay-hosting.secureserver.net";
                  smtp.Credentials = new System.Net.NetworkCredential("myemail@mysite.com", "mypassword");
                  smtp.Send(mailMsg);

    Also, if you want to replace the sender's email address with a nice readable name, you can replace the one line:

                  MailMessage mailMsg = new MailMessage("myemail@mysite.com", "rxemail@clientsite.com");
     

    with these three lines:

    MailMessage mailMsg = new MailMessage();

    mailMsg.From = new MailAddress("myemail@mysite.com", "Elvis Presley");

    mailMsg.To.Add("rxemail@clientsite.com");

     

    Best of luck, let me know how you get on.

     

    Garrett Brennan

     

  • Re: Correct Settings for using SMTP on GoDaddy?

    03-31-2008, 2:37 AM

    Hey Greg,

    Not sure if you got my emails yet or not, but I think trying the 'sendmail' class may work considerably better for you than the 'mail' class. Unfortunately I am not much of a PHP guru so I don't have much experience, at least not on GoDaddy servers. Let me know if the 'sendmail' class works out for you as I would like to be able to keep that in mind in case I run into it again.
     

    Geoff Kauten
    www.KautenEffects.com
  • Re: Correct Settings for using SMTP on GoDaddy?

    04-09-2008, 9:06 PM
    • Loading...
    • Randy25
    • Joined on 04-09-2008, 11:46 PM
    • Posts 1

    Thanks for your example, I have been working on this all day.  Here is a C# version for anyone who wants it.  I did not need the ( ) around the subject value.

    My big problem was that the Relay-host won't work unless you are testing it on Godaddy.  I wasn't for the longest time.  I was unable to get the authenticated sending to work at all through their normal server "smtpout.secureserver.net" due to Mailbox and domain errors.

    Also I was unable to edit my Web.config like most people recommend as it kept giving me errors.

    I call it from a button click.

    protected void Submit1_ServerClick(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                Send_Email();
            }
        }

      protected void Send_Email()
        {        
            String mailServerName  = "relay-hosting.secureserver.net";
            MailAddress fromAddress  = new MailAddress("yourEmailAccountwithGoDaddy@yourDomain.com", "your display name like John");
            MailAddress toAddress = new MailAddress("yoursendingemail@sendingdomain.com");
            MailMessage message = new MailMessage(fromAddress, toAddress);
            message.Subject = "Your subject";
            //message.Body = "this is the body Text";
            SmtpClient mailClient = new SmtpClient();
            mailClient.Host = mailServerName;
            string myMess = " whatever you want to put here";

            message.Body = myMess;
            try
            {
                mailClient.Send(message);
                Response.Redirect("ShowSuccess.htm");
            }
            catch (SmtpException e)
            {
                Response.Redirect("ShowError.htm");
            }
            message.Dispose();
     
        }

  • Re: Correct Settings for using SMTP on GoDaddy?

    04-20-2008, 4:45 PM
    • Loading...
    • djavastark
    • Joined on 05-25-2005, 3:25 PM
    • Posts 3

     relay-hosting? relay-hosting?! How was I supposed to know that? They just changed this in January or February of 2008 and it broke (TheKBase Web). Before that you could use smtpout.secureserver.net. I wish there were some way to see the changes that GoDaddy is making on a daily basis.


    Dan Rosenstark

    Confusionists, Inc. Makers of TheKBase and TheKBaseWeb
  • Re: Correct Settings for using SMTP on GoDaddy?

    04-20-2008, 5:26 PM
    I agree, it would be nice if they posted this information somewhere or had a "proposed change schedule" etc... As far as I know they do not have anything in place that would update their users to the various different changes they make. I have seen several people leave their services behind time and time again because of how frustrated they get with the absent minded tech support, and the generic non-specific responses they get to each problem. The best thing to do though is just continually search forums, blogs, and other enthusiast sites and such. I can find answers to my problems online in the same amount of time it takes to get past the hold music with GoDaddy. I have just come to grips with the fact that if I have a problem with their hosting it is up to me to find a way around it.
    Geoff Kauten
    www.KautenEffects.com
Page 3 of 3 (37 items) < Previous 1 2 3
Microsoft Communities
Page view counter