Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I setup my domain correctly on MailGun?

This might be my only problem. I get this message under my domain names in my account on mailgun:

Warning: Some of your domains (in red) have DNS configuration issues.

What can I do about that? I've tried a huge random domain name and it does the same thing.

Thank you for taking a look!

-------------------------- In case this is not my only problem --------------------------------

I am using parse.com with MailGun. I have all my parse stuff setup and I've made an account with MailGun and added a custom domain name with MailGun. Here is my iOS code:

    NSDictionary *params = [NSDictionary dictionaryWithObject:@"This is sent from your iPhone." forKey:@"text"];
    [PFCloud callFunctionInBackground:@"emailGrocery" withParameters:params block:^(id object, NSError *error)
    {
        if(!error)
        {
            NSLog(@"Succeeded");
        }
        else
        {
            NSString *errorMsg = [[error userInfo] objectForKey:@"error"];
            NSLog(@"%@", errorMsg);
        }
    }];

This is in an example from parse. And I think this is doing what it should, as I get the error message in my log.

Here is my cloud code that is being hit:

 var Mailgun = require('mailgun');
 Mailgun.initialize('domain.com', 'key');

 Parse.Cloud.define("emailGrocery", function(request, response) {
 Mailgun.sendEmail({
   to: "[email protected]",
   from: "[email protected]",
   subject: "Hello from Cloud Code!",
   text: "Using Parse and Mailgun is great!"
 }, {
   success: function(httpResponse) {
     console.log(httpResponse);
     response.success("Email sent!");
   },
   error: function(httpResponse) {
     console.error(httpResponse);
     response.error("Uh oh, something went wrong");
   }
 });
});

I have my actual email address in there as the sender and another known email address as the receiver. I always get the error response back. I have an actual domain and key in there. In my account on mailgun under my custom email domain names there is this message:

Warning: Some of your domains (in red) have DNS configuration issues.

I can't figure out what I should do about this. I realize that that might be my only issue, but what do I do to resolve this?

like image 941
SirRupertIII Avatar asked Sep 05 '13 08:09

SirRupertIII


People also ask

What is domain name in Mailgun?

If your company's primary domain is mycompany.com, we recommend the following domain names for Mailgun: mycompany.com - unless you're already using this name for your corporate email (e.g. with Gmail or another provider). mg.mycompany.com, or mail.mycompany.com. mycompany.net or mycompany.org.

Do you need a domain for Mailgun?

A verified domain is required to send any emails at Mailgun, and the verification process is critical to protecting our infrastructure and your domain's sending reputation.


2 Answers

I want to share 2 screenshots that might help verifying custom domain for Mailgun in Namecheap... I banged my head against the wall for 2 days :)

enter image description here

enter image description here

Mailgun has a button check your DNS settings and sometimes it gives false negatives so try it a few times

like image 151
luigi7up Avatar answered Sep 28 '22 08:09

luigi7up


You need to verify your domain with SPF and DKIM. You can do this by adding TXT DNS records.

See more info at https://documentation.mailgun.com/user_manual.html#verifying-your-domain

like image 41
Lee Avatar answered Sep 28 '22 07:09

Lee