Configuring Elastic Email SMTP for WP & Drupal 7

Hi all. I’m on a steep learning curve as far as email goes, so please excuse if I am asking a dumb question. There are 2 parts to the question; sending and receiving.

I have 2x sites now hosted fully on CW. 1x WP site and 1x Drupal 7 site. Each has its own domain with DNS management sitting in Clouflare. The only DNS records I currently have are the A record that point to my CW server IP and then of course route internally to their respective app.

Each of my sites has a contact form and I want to configure SMTP mail for each of the sites using Elastic Email (which I have registered to my server) so that when the contact forms send a mail back to me, it is sent from the domain url of the respective app e.g. “submision@mywpdomain.com”.

I have SMTP modules installed on both apps, but of course I have to enter certain details and credentials, such as smtp server, port, credentials etc. Unfortunately, I am unable to find a guide to setting this up in Cloudways support. All I can find is the guide that explains how to enable Elastic Email on my server.

Second part to this is receiving email. If I wanted to have a central mail ‘portal’ that I could have all inbound mail direct to from my various domains, what is the best way to achieve this.
I am guessing I will need to sign up to a service of some sort and then create a DNS record (MX?) with details of the email service provider?

E.g. I want contact @ thisdomain com, contact @ thatdomain com to be captured within a single portal that I can access each. I am not particularly bothered about them routing to an email client (POP3?).

Anyway, any guidance or advice you can provide is greatly appreciated.

Thanks in advance

/Danny

Hi Danny,

If I’m understanding correctly, you need to;

  • Configure a send from address in your application settings.
  • Configure an SMTP server to send your transactional emails.
  • Configure a CatchAll Mailbox which receives emails from both sites.

Everyone has his/her own methods on how to go around the same scenario, yet I’ll share what I think could be possible solutions for the above.

  • From the Application settings configure a From address so that when your sites sends out an email, they appear to be sent from the desired ‘From’ address.
  • If you don’t want to use Elastic Email (Seach support site for how-to-activate-elasticemail-addon), you can always use Gmail (Seach support site for configure-gmail-smtp) as your SMTP gateway, yet only use Gmail option if you have low volume of emails being sent.
  • Let’s say you have a Gmail account, and want to receive all emails received from both domains on any email address in this location - What I would do is as follows. Use the Rackspace email service add-on to create a mailbox for each domain. Then set this mailbox to forward any email received to my Gmail account, and finally create a CatchAll rule. The CatchAll rule will make sure any email sent to my domain is forward to the unique central mailbox at Rackspace, and Rackspace will forward any email to my Gmail account. You can than configure your Gmail to use those Rackspace mailboxes as your outgoing SMTP in order to send emails from your Gmail account impersonating ‘contact @ thisdomain com’ or ‘contact @ thatdomain com’. I’ve suggested Rackspace as its way cheaper than GSuite on a month to month basis for just 1 mailbox.

Let me know if the above helps or if you require further help.

Hi Jason. Appreciate the reply, thank you.

I have been researching and was playing with this last night. I think I have pretty much gotten to where I need to be, but I did have a couple of points that need clarifying, if you are able to do so.

Initially, I did set up a gmail from account on the WP domain using the WP SMTP Plugin. I followed a guide that explains how to set up the necessary application permissions within the google account settings and once I had all the secret keys etc. installed, it seemed to work well.

What I then did, was to sign up to the Elastic Email service, now realising that it is outgoing SMTP only and really more suitable for apps that send ‘bulk’ emails.

After a little more research, I realised that the rackspace addon would be more useful. I enabled it for the two domains I have and quickly figured out that I could use it for both sending as well as receiving. I followed the guide to set up the MX, AutoDiscover & TXT (spf) DNS records (not sure yet about the DKIM or even whether I need it).

Anyway, I am now using std SMTP addons for both the WP and Drupal 7 sites having entered the respective ‘Send From’ domain for each site and the correct rackspace SMTP server/credential settings. I note however that they authenticate with username/password rather than an API Key (API Keys being another technology element I need to learn about).

I am aware that I could consolidate from one, but am happy with where I am at the moment. I am also accessing each email domain account by adding them to the Gmail app on my phone (IMAP), so that works a treat.

Couple of clarification points if I may. If I didn’t have an SMTP provider enabled on the server, and of course was not using the SMTP addon in each application, I am assuming the apps would default to sending mail using the php mail() function?

Secondly, If I simply enabled Elastic Email on my server, I would still need to install & configure the Elastic Email module/addon for either WP or Drupal 7 as it will not default to SMTP sending without one i.e. it would still continue to use the mail() function ?

Regards

/Danny

I am assuming the apps would default to sending mail using the php mail() function?

  • You are correct there, if none is configured, the server will send emails using the php function, which is not recommended.

Secondly, If I simply enabled Elastic Email on my server, I would still need to install & configure the Elastic Email module/addon for either WP or Drupal 7 as it will not default to SMTP sending without one i.e. it would still continue to use the mail() function ?

  • If you enable Elastic Email as your server mail gateway/smtp relay, any mail sent from that machine (thus from any application/website hosted within it) will relay through Elastic Email, thus you shouldn’t need to re-configure each and every application.

Quick none Jason. When playing with mail sending from apps (in test application), is there any way to test if mail is sent by SMTP or not?

Sure, send it to yourself, and when you receive it look at the mail headers (‘Show Original’ in Gmail). That way you can verify which SMTP IP was sending you the email.