I need a little advice or help on Mailgun setup - please

I wasn’t sure if I could use Gmail so I created a pay as you go MailGun account.

I am confused on how mailgun is supposed to work. So if my website email is support@example.com and say its with Google mail. If I want my website to send emails as support@example.com - then do I keep using Gmail to send my emails as before?

On the Ghost admin Screenshot by Lightshot , which API key should I use because Mailgun gave me Key ID, Private API key and Public validation key? I so, wish there was better documentation for Ghost.

I have created the Mailgun account. However, there is no YouTube videos that are any good on MailGun setup for Ghost. However, I am stuck on this bit, see screenshot below.

Do I use the content in the screenshot to create a dot.js file?

I used a subdomain as my mailgun email domain as recommended by mailgun.

Based on the screenshot of the file here: Screenshot by Lightshot I am not sure what I should put in each line below.
Line 1 = do I leave that alone, as I am not sure what to put in the green area?
Line 2 = Is In the green text, is it my top level domain or my Mailgun subdomain?
Line 5 = I think I understand it should be something like "My Name or Company Name support@mg.example.com’,
Line 6 = I am confused about what should go here ‘bar@example.com, YOU@YOUR_DOMAIN_NAME’
Line 7 = What would the subject be? Is this just one off test email or my main setup?
Line 8 = I am not sure again. Is this just one off test email or my main setup?

I will be very grateful if anyone can advise me on the above. Thank you.

2 Likes

I think you might be taking this a step too far. Mailgun should send email using your email address via the subdomain. All you need to do is follow these instructions and connect to Ghost via the Mailgun API and Ghost should take care of the rest. Just copy the API key that’s blurred out in your screenshot and paste it into Ghost > Labs > Email Settings and Ghost emails will be good to go.

Once you add the API key and update your config.production.json file Ghost will send members emails based on signups or logins (you cannot modify these). You’ll also be able to use the Ghost newsletter features which are detailed here.

2 Likes

Thank you so much. I am grateful for your help. In this instance before I had paid someone to do it before I saw your reply. Nevertheless, your reply is very helpful. One question. Is SSH a bit like FTP or more like Terminal? Which application do you recommend for SSH? I am using Digital Ocean to host my Ghost site.

I couldn’t find a descent set of instructions. Your link is more straightforward and is very useful.

Thank you.

I don’t think you want to use FTP to update the file because you have to run ghost restart. Here’s what you want to do:

  • Open Terminal (if you’re on Mac) and type “ssh root@your_ip”. It’ll ask for your password.
  • Then you’ll want to change over to the ghost-mgr user (this user has permissions on DO ghost installs by default) by typing “su - ghost-mgr”.
  • Navigate to your ghost install folder by typing “cd /var/www/ghost”
  • Type “ls” (that’s a lowercase L) to make sure you see “config.production.json” in the folder
  • Once you confirm you’re in the right place, type “nano config.production.json”
  • You can then edit the file with your Mailgun info

I recommend taking a snapshot of your droplet before doing all this… just in case!

2 Likes

Thank you. You are awesome…
One day I hope to have some time to learn coding and things like HTML, not for a career, just to help me do things. Thanks again.