4

After receiving some clarity on CiviMail settings and using a ton of guides - we were able to setup GSuite / GMail as our email provider. The answer to how we implemented it is below. If others have feedback - please chime in.

3 Answers 3

4

Setting up GSuite/Gmail as your CiviMail Provider.

Decide if Gmail/G Suite is right for you. The limits for GSuite users is 2000 sent messages sent per rolling 24 hour period. Regular @gmail.com users are limited to 500 sent messages per rolling 24 hour period. If you are an organization with less than 1000 email list contacts and you have Gsuite - this may be a good option for you - assuming you only send 1 email blast every 24 hours - to not exceed limits. If you are a regular Gmail user - this would only be a good option if you have less than 400 contacts that receive emails - and I would stagger your email blasts to maybe 100/hour. This would still leave you with 100 emails for regular communication and activity emails. Using the SMTP relay service - limits expand significantly - however - I have not tested the reported 10,000 emails per rolling 24 hours limit for SMTP-Relay.

Create two accounts in Gsuite/GMail, one that will be used as a bounce account and another that will be an email to activity account.

Follow these instructions on how to setup gmail as your email provider in CiviCRM. Same instructions apply for the bounce account except you will use the bounce email and select Used For Bounce Processing. You will need to allow access to less secure apps - if you use 2FA - you will need to setup an app password.

Setup your from email. If you are not using SMTP Relay - it must match the same email address you have in Gmail - or the Gmail server may reject your email. If you are using SMTP Relay - you should be able to add multiple from addresses as long as they are real email addresses that share your same domain. Meaning if your smtp relay is [email protected], the only other emails you can use as from are @wonky.org. You would not be able to use a @gmail.com address.

Follow these instructions on how to configure your outbound email service. While the doc recommends using mail() - I found the best experience to be using the IMAP settings in your GSuite/GMail account - however - if you are a GSuite user - I highly recommend you use the SMTP-Relay service. Follow these instructions to setup your GSuite account for SMTP Relay - Comprehensive email storage is recommended for best deliverability - but we have not noticed much of a difference. Then use the following settings for your outbound mail settings.

  • Server: ssl://smtp-relay.gmail.com
  • Port: 465
  • Authentication: Yes
  • SMTP Username: complete email
  • SMTP Password: password

Setup Cron & Mailer Settings

  • We setup our mail cron to send batches every 15 minutes - we also limited batches to 250 contacts (Mailer Batch Limit). (Administer - CiviMail - Mailer Settings) We have also sent email without the mailer batch limit with success. We will be testing limits further and will update this answer.

I hope you found this guide useful - let me know if I should clear anything up or add anything else.

Do you use Gsuite as your outbound email in CiviCRM? If so - chime in with your thoughts!

13
  • Hi themak :) Did you see this question: civicrm.stackexchange.com/questions/22731/… on setting up alternative outbound emails - any thoughts on that from your experiences with gsuite? Commented Feb 20, 2018 at 10:15
  • @michaelmcandrew I have updated the "from" section with more information. Are you using "@gmail.com gmail" or "GSuite Gmail with your own domain"?
    – themak
    Commented Feb 20, 2018 at 16:10
  • neither! I am not using gsuite. But I will point Ben here and see what he says. PS. You might be able to provide him with a better answer that I have on the question I referenced above. Commented Feb 20, 2018 at 16:35
  • @themak - many thanks for your helpful post. It took us a long time to correctly configure SMTP in CiviCRM to work with our Gsuite account. We are still having a few problems and I posted a question that michaelmcandrew has reffered to above. When sending from different email accounts the emails would always change and use the mail account set up in the outbound mail settings. Thanks to your post we have fixed this. For our server address, we had been using ssl://smtp.gmail.com. I changed this to ssl://smtp-relay.gmail.com, and now all the emails show the correct FROM address.
    – Ben
    Commented Feb 21, 2018 at 10:11
  • 1
    Even if the relay works, it doesn't look like accessing the bounce processing account will. As far as I can tell accessing the bounce messages will require a secure connection. Commented Feb 8, 2020 at 17:49
1

A) question about "reply-to" field

To those who successfully use smtp-relay.gmail.com in civicrm : when you send a Civimail mailing, what "reply-to" field do you get ? I would expect it to be something like [email protected] so that when a user replies to the email, civicrm can figure it out. After a lot of tests, the "reply-to" is always the same as the "From" address, which is not the expected behaviour I guess. I have of course ticked the "VERP" box in civimail config.

Below are details about my issue with smtp-relay.gmail.com I think I have configured everything as described above (sadly, I found this post after a lot of try & fail error)

B) SMTP relay service configuration on Google workspace

allowed senders : only addresses in my domain authentication : only accept mail from one specific email address require smtp authentication : yes require TLS encryption : yes smtp relay config

C) Civicrm SMTP configuration

Serveur : ssl://smtp-relay.gmail.com Port : 465 Authentication : yes user and password : those of a Google Workspace user (let's call it [email protected]) Clicking on the "save and test" button works fine, I receive the test email

D) Civimail results :

I have prepared a mailing. "From" address : [email protected] (which is also an existing account in google workspace).

I have also tried using [email protected] (which is NOT and existing account in google workspace.

Before launching the mailing, I try to send a test email, let's say [email protected] (of course, to a real email I own) test civimail

It does not work.

Pop up message in civicrm (translating from French) says :

Unable to identify recipients. Maybe your test group is empty or you tried to send to contacts that don't exist and you don't have permission to add contacts. Of course, launching the mailing fails completly also : result is 100% bounce

enter image description here

E) Workaround

I have found a workaround, which is bad from my point of view, and don't want to use : in Google Workspace SMTP relay configuration, configure "allowed senders = any address (not recommanded)" By doing this, almost everything works fine : various recipients receive the mailing (still need to fix DMARC configuration to pass through spam filters)

F) Can you help ?

I'm stuck with no more idea to explore. What about you who successfully made this work?

Are there any logs somewhere (in civicrm or google workspace) that I can rely on to understand the problem ?

The only probable difference with your setup is that the MX of my domain points to Microsoft 365, NOT to google workspace (we use microsoft 365 for "user" email, and here I am trying to use Google workspace mainly for the SMTP relay feature). I think this should not matter : the incoming email configuration (MX) has nothing to do with outgoing SMTP configuration.

1
  • Hey there, I have given up on trying to make this work with gmail. I do not think google wants us to use their service for this purpose, so we switched to SparkPost. I think there are other services that work with CiviCRM like Amazon SES, MailGun, etc. civicrm.org/…
    – themak
    Commented Aug 11, 2022 at 15:01
0

Allow me to reactivate this very usefull post. I am trying to use smtp-relay.gmail.com for outbound emails, without success.

Before explaining the problem, let me share a solution I found to an issue I read above : when using smtp.gmail.com (not the relay), it seems that the "From" address must be the same as the account used for smtp authentication. In fact I found a workaround : in the gmail settings of that user, add another email adresses allowed to send emails from that account. If in civicrm you have 2 "From" adress ([email protected] and [email protected]) then simply add them in gmail settings. Once done, emails sent by civimail have a "From" address corresponding the civimail parameters, instead of the smtp account used for authentication

Screenshot

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.