Marcos Placona
Marcos Placona
Marcos an experienced Developer Relations leader turned solopreneur, GDE and in ❤️ with Open Source
5 min read

Categories

  • Technology

I’ve recently been playing with Google apps for domains, where it lets you create Gmail based emails for your domain. Basically you can configure Google apps to manage your domain’s email therefore saving a few things. The first few that spring to mind are:

  • the effort to configure a mail server properly;
  • the money you will save, for such a great engine;
  • all the bandwidth (believe me, this this thing is expensive);
  • space on your server;
  • memory and processing;

I could probably mention some other things, but in my opinion those above are the most critical.

Well, I’m not getting any commission, so I better get started with this “how to”.

First things first. Create an account for your domain:

Go to this link and follow the whole process.

It’s a bit boring I know, but hey! It’s all worth it at the end.

It will then ask you for some confirmation. Either you have to upload a file to the root of your webserver, or change an MX Record. It will then go to your

server and check if you did what it asked you to. Once it’s confirmed, you’re ready to go.

You can now create your users, but be aware that you’re domain is still not fully hooked to gmail, as you need to “tell” it to use Google’s service.

Easiest way to do that, is by going to your DNS Manager and creating a few records. In my case I simply go to my Slice Manager on Slicehost and click DNS, then select my domain, and click records. I then create 7 new MX records as follows:

SliceHost MX Records - Google

 

After having created all this records, you’re almost ready to go. It takes a few hours for everything to propagate, and Google to recognize all your newly created records; but once it’s done, you can start sending and receiving emails.

Now for phase two:

We have be able to use it for sending emails from your server, so you’d be able to use something like: smtp.gmail.com

The way to go is create an account responsible for sending emails, and every single email will be sent from this account. Obviously you can skip this step if you would like to have proper clients using this service.

In my case, I only need to send emails from forms and stuff like that, so I created an account specifically for this task.

If you were configuring this on your server, you would do it like this for ColdFusion Server:

SMTP - ColdFusion Server configuration

Notice I’m using port 587, as it’s the required port for Gmail. You would also need to have a few extra things on your tag, as it requires authentication.

An example would be:

	from = "e-mail address"
	to = "comma-delimited list"
	subject = "string"
	username = "username@yourdomain.com"
	password = "string"
	useTLS = "yes">

Notice the last three lines on the code. They are the responsible for the authentication. Sadly Google requires TLS Authentication and only ColdFusion 8 (or upwards) and Railo (not sure about BlueDragon)

can handle that.

On Railo though, it’s a much easier configuration, as you only need to configure your webserver’s context with your details, and use CFMAIL as you would normally, straight out of the box.

An example of configuration would be:

Railo - SMTP COnfiguration

Notice I specify port 587, and tick TLS to be used. It took me a while to get this configuration right, and I’d like to thank Andy Jarrett for helping me with it.

You should now be all set, and have your email configured. The free version only allows you to have up to 50 emails, but you can always buy the pro version

if you think it’s not enough.

You can now create a new record on your DNS Manager in order to have mail.yourdomain.com, so you don’t need to use Gmail’s big URL in order to access your webmail. This is how I did it:

DNS - MAIL

Notice I point it to ghs.google.com, and call it mail, so I can access mail.mydomain.com.

And that should be all you need to have a fully functional email for your domain.

I hope you enjoyed it, and let me know if you have any problems with it.

YOU MIGHT ALSO LIKE