Setting up Google mail for your domain (Google apps)

Discussion in 'Email' started by Michael, Oct 13, 2009.

  1. Google mail is relatively easy to set up. You only need to make a few DNS changes, and those can be done through Control Panel.

    If you haven't set up Google apps for your domain yet, you can do so here. They will ask you to upload a small file to your site to verify that you are the domain owner. Once you have done that you can proceed with these instructions.

    The first thing you want to do is update your MX records. The MX records direct mail to the proper servers for your domain. Log in to Control Panel and click the Domains tab, then in the DNS column, click Manage for the domain you are configuring for Google apps mail.


    There are four steps that you have to complete in Control Panel.


    1. Delete the A record. That points your domain to our web mail system, so you will not need it. After deleting this record you can still download any mail that may remain on the server, you just won't be able to reach web mail through the URL based on your domain name. You are going to set up a CNAME record to function as

    2. Add the CNAME record as shown. Note that Google may display the server name with a trailing dot, but you are going to leave that dot off when you enter the server name in the Destination field.


    3. Now delete the existing MX record.

    4. Click the Add button to enter the Google MX server information. The MX records are listed here. When entering the MX records, leave the first field blank and remove the trailing dot from the server name, as you did when setting up the CNAME record.


    Enter each of the five Google MX servers. When you're finished, your MX record section should look like this (some Google instruction pages list seven MX servers, this shows their configuration for five):


    Go back to the Google apps page for your domain and click on Service Settings > Email. Then click the Change URL link.


    Click the radio button for (custom) and enter "mail" into the field. This is going to point to the CNAME record you set up in Control Panel.


    On the next page click the I've completed these steps button. Google apps should then log you back in to your Google control panel. Next to the Email link you should see a status of "Updating..." If you see a status of "Inactive," double check your MX and CNAME entries in your Winhost DNS settings.


    That's it, you're finished.

    If your domain is not newly registered, you should be able to access Google mail within an hour or so. Bear in mind that Google says it could take as long as 48 hours to verify your MX record changes, though it rarely takes that long.
    Last edited: Oct 14, 2015
  2. FredC

    FredC Winhost Staff

    nice tutorial!
  3. Thank you for a great post. I have completed these changes, and everything mail-related is working fine.

    My issue is that now I cannot send mail from my site unless I change the site mode to Full Trust. Is there a way that I can relay mail using the internal server to my Google hosted mailbox, or should I just go ahead and change the site to Full Trust mode?

    For others trying to figure this out, in order to send mail from using Google hosted email, the code is:

    SmtpClient client = new SmtpClient("", 587)
                		Credentials = new NetworkCredential("[email protected]", "password"),
                		EnableSsl = true
  4. That's interesting. I haven't seen anyone else try to relay through Google from an app on their site, so I'm afraid you're the guinea pig on this one. ;)
  5. Ray


    If you are going to use another SMTP server then I suggest you stick with Google's SMTP server. Plus using our SMTP server will not avoid the Full trust mode. You'll still need to setup your application to use Full Trust. But if you want to keep your application to be a little more secure, try creating a subfolder and set it as an application folder. Upload the portion of your application that relays out the email to that subfolder. Ofcourse since it is setup as an application folder that portion of your application that sends out email will be using that web.config file. This way you can setup just that portion to use Full Trust mode while your other applications stays at medium trust mode.

    Now remember this setup will mean you'll have to redesign your site a bit. Basically what you will be doing is moving the functions and methods that actually sends out the email to its own application folder and pass the variables, such as the To and From address, the subject line, and body to those functions.
  6. Just watch cause there are limits to how many emails you can send.
    I wrote a blog about it here.

Share This Page