What is Mailgun?
Mailgun is an email delivery service that provides developers an easy API to send out transactional emails from their website and the Mailgun service is already built into the core of Workice!
Using mailgun wil guarantee your emails were safely sent out, it can track who clicks the links in your emails, and so much more. The cool thing about mailgun is that you can send out 10,000 emails for free every month!
Integration with Workice CRM
- Visit http://mailgun.com and signup for a free account.
- Use Mailgun as our mail driver in Workice.
Workice needs to know that we want to use the Mailgun driver. So, we can open up our .env file and find the mail driver key which will look like this:
change it to this:
- Add a domain to be the sender of emails. Example (no-reply@website_name.com)
After signing up at Mailgun you will see a screen similar to the following:
If you scroll down to the bottom of this page you will see a button that says: 'Add your domain'. Click this button and you'll arrive at a new page like the following:
You will now need to enter your domain as a subdomain, something like: 'mg.website_name.com' and then press 'Add Domain'.
Next, you will see a page that gives you instructions on a few DNS records to add. You'll want to make sure to add the 2 TXT entries and the CNAME entry in step 1 and 2. If you already have outgoing mail for your domain such as Gmail you don't need to worry about step 3.
Wherever your domain is hosted you will need to add those new DNS records and then click the 'Continue to Domain Overview' button.
If you are using something like cloudflare or another fast DNS server it shouldn't take long to propagate. No longer than about 10-15 minutes.
(Tip: In the domain overview section you will see a button that says 'Verify Your DNS Changes' and that will let you know if the DNS has been updated successfully).
So go ahead update those DNS records and let's move on to the next step.
- Add Mailgun credentials to your .env config file.
Next, we need to add some credentials for our newly created Mailgun account to Workice. If we open up .env file, you will see the following code:
The domain is going to be the domain we just setup 'mg.website_name.com'
- Send our test email.
Now go to Settings > System Info and click Test Email then send yourself an email (Requires CRON to be already setup)
Some time consuming tasks such as sending an email are queued in Workice that requires CRON to have already been setup.