Setting up Mailgun on subdomain

I obviously need help with this one.

I have main domain and subdomain - 2 different websites. There is a default laravel registration form on subdomain.
I need a functional process of email sending to users on a subdomain. Mailgun gives this opportunity. But when I starting to set up all the things I cannot insert MX records:

the same is for DNS Records: NO DOMAIN ON ACCOUNT

Does that mean: I can use mailsend only for domain and NOT for subdomain?
Or it means that I will set up mailsend for domain and subdomain will use it also?

I feel like asking stupid questions, but I can’t figure it out myself.

You can’t set MX records on a subdomain from our panel, that’s true. But that doesn’t mean you cannot send email from your subdomain.

First of all, you don’t need MX records to send email. Mailgun does give you MX records to use, but you only need those if you want to receive email with Mailgun. That’s entirely optional.

So you may still be able to add your subdomain as a sending domain to Mailgun.

And even if you can’t, that doesn’t mean you cannot send email. If you have example.com as a sending domain, and would like to send mail from blog.example.com, you could use [email protected] as your sending email address. So you can skip the subdomain setup entirely.

3 Likes

I don’t get it, what should I do?

I have domain: qr-rescue.epizy.com
I have API Key from Mailgun account

I have also DNS Reocrds and values in Mailgun: krs._domainkey.qr-rescue.epizy.com

I know that I have to configure mailgun in config/services.php

and there is .env configuration also:

mailenv

I have to perform these steps, but I got stucked by the first one:

  1. Go to your DNS provider
    Go to the DNS provider that you use to manage qr-rescue.epizy.com and add the following DNS records. Where to add?
  2. Add DNS records for sending
    I have to enter this value: v=spf1 include:mailgun.org ~all where to enter? .env? services.php? cPanel?
  3. Add DNS records for tracking (I don’t think I need this step)
  4. Wait for domain verification

I watched a step-by-step video, but I didn’t see any similarity what is in video and what is in cPanel of Infinityfree

I’m sorry. I assumed that “subdomain” meant a subdomain of your own domain, not a free subdomain. The instructions only apply if you have your own domain, and want to upload something to a subdomain of your own domain.

The DNS record you need to enter is called an “SPF Record”. There is a section called that in the control panel. But again, that only works if you have your own domain name.

2 Likes

So what are my chances? User will not be able to register, because of the email which will not be sent to verify user’s email?

Well, you still have some options:

  • Try to send the email with PHP mail first. If you’re lucky, it just works. We whitelist specifically verification email templates from popular scripts. So if you use a popular script, you may be able to use PHP mail anyways.
  • Send the mail with a Gmail account or other email service without custom domain. It won’t be quite as professional as using the domain of your website, but at least you can get the message out.
3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.