Mandrill Inbound email- setting up Sending Domains with an app hosted on Heroku - ruby-on-rails

I am trying to learn the ins and outs of Mandrill, so I created a test app that has no functionality except creating users, signing them in and out, and clicking on a link that sends the user an e-mail through ActionMailer.
So far all of this works fine. I have configured Mandrill to send e-mail in both development and production (Heroku). What I'm trying to do now is configure it to receive e-mails sent from users and do stuff with them. My problem is that I'm not sure what to add as my mail domain in the Sending Domains section of my Mandrill account page.
I've done this before with an app on Heroku using Mailgun. Mailgun gave me a Mailgun subdomain to use for user testing off the bat (app12345678.mailgun.org). I was able to send mail to postmaster#app12345678.mailgun.org and it worked perfectly. With Mandrill it's proven a bit more difficult.
Mandrill doesn't seem to provide a Mandrill subdomain to start with. I suppose my question is: is it at all possible to get a Mandrill subdomain for testing like the one Mailgun provides? If not, how can I go about user testing inbound e-mail with Mandrill if I don't currently own my own custom domain? What can I use as the Sending Domain?

it's not currently possible to use Mandrill's inbound email routing unless you have a domain/subdomain to work with. We don't provide a testing subdomain to use for inbound routing.
Any domains you actually send from in Mandrill will be added to the Sending Domains page. You don't have to manually enter any domains there, since we'll detect any that you use and show them there automatically. If you want to set up SPF and DKIM for your sending domain, you can manually add it in order to validate the records have been added correctly.
If you have other questions specific to your account, our support team is also happy to help if you want to get in touch via the Support button in your account.

Related

How to disable sending default emails when a user place an order?

I am working on a Third party application where I want to send customized template emails to user using webhooks when user place order or shipment gets created.
Is it possible to prohibit system to send email to user who place order and instead of that just fire an event to a third party app(using a webhook) so that that third party app will send email to that user with required and customized new details in new email template(which is not available in default variables of email templates)?
Any solution for this? Please
There's two options. One enables you to prevent emails from being sent and the other repurposes the initial default email. There isn't currently a way to disable the email from being sent as the setting doesn't existing in BigCommerce.
Option 1
Set up an SMTP server and configure mail relay rules
SendGrid covers some good basics on what mail relay is. BigCommerce has a support article for connecting your store to a custom SMTP server. You can also see more in the instructions from Microsoft on how to configure mail relay rules for Exchange.
Overall, this option is more complex.
Option 2
Conversio has a quick and easy guide on replacing the content of the default emails. It isn't the ideal solution, but it is less confusing than sending two receipts.

Subdomains in Mandrill

I am using Mandrill trial account for sending emails, i have a question which i am not able to find a solution.
I have a domain (www.domain.com) which is registered with Mandrill account with an email address email1#domain.com. I have a requirement where i have to sent emails from different sub domains from mandrill. Is there any facility to configure sub domains or wildcard DNS in Mandrill. Basically i want to sent email from different email addresses like email1#subdomain1.domain.com, email2#subdomain2.domain.com, email3#subdomain3.domain.com.
Here the sub domains can be anything which changes for different users, but the main domain doesn't change. Is there ant way to achieve this.
Please help me, I am new to Mandrill.
Since you own the domain and thus also the email server,
go to your email settings
forward/reroute email2#subdomain2.domain.com to email2#domain.com
receive verification link on email2#domain.com
verify and use the application

Is it possible to receive e-mail using Google Apps for Work (gmail) with a heroku domain?

I have a Google for Work account and I'm creating an e-mail address with my herokuapp domain (e.g. me#myapp.herokuapp.com). I have verified the domain by putting the meta tag in the header of my app. I can send e-mail through gmail from me#myapp.herokuapp.com but for some reason I can't receive e-mail. I'm curious what is causing the problem of the e-mail not going through.
If anyone has some insight, I would appreciate it. I know that it's possible to receive e-mail by using a custom domain in my heroku app, but I don't want to spend the money on a custom domain right now.
As mentioned by miketreacy, you would need to configure the DNS records for your herokuapp.com subdomain to point to the Google server.
This is not something Heroku allows you to do though. The only way you can send and receive emails from your app is with your own domain name.
Your MX records are not set to Google's. Currently, the MX records are listed as these. In order to receive emails at this domain - in your Apps account - you'll need to modify your DNS to match the MX records listed on Google's Support site.

Is there a way to setup a fake email inbox to check that email messages are being sent in ruby on rails?

I'm testing several user accounts and don't want to setup different emails to test with. All I need to know is if the email has been sent from my app successfully.
Is there a way to setup a fake email inbox to check that email messages are being sent in Ruby on Rails?
Set up MailCatcher:
MailCatcher runs a super simple SMTP server which catches any message sent to it to display in a web interface. Run mailcatcher, set your favourite app to deliver to smtp://127.0.0.1:1025 instead of your default SMTP server, then check out http://127.0.0.1:1080 to see the mail that's arrived so far.
This does several useful things for you:
Not only can you see that email is being sent but you can look at the email (text and HTML parts) as well.
You won't have to worry about spamming anyone as all the email your application sends goes straight to MailCatcher.
You won't have to worry about setting up a bunch of real email accounts anywhere, MailCatcher doesn't care what the addresses are, it just grabs the email and shows it to you.
Most importantly, your application doesn't have to change to use it, you just set up the appropriate SMTP values and away you go. This means that you're not running different code paths for your email handling in development, testing, and production and that means fewer bugs and late night disaster calls.
During development and testing, emails are also shown on the console. That has always been enough for me – I don't doubt rails' ability to actually send it once it's in production.

Emails sent from postfix via a Rails app are getting sent to spam in gmail

When using 'mail' command to send email to a gmail user, the email goes through fine. When sending an email using a Rails app, the email is sent to the spam folder for the gmail user. Can someone help me think through this?
Emails landing in SPAM can happen due to many reasons:
Wrong Mail Server setup: Checkout here on how to setup
Email content: Content of the email can also invite SPAM. Sites like SpamCheck helps to check whether the content of the email is ok.
As mentioned by #Noli above, using services like Sendgrid, Critsend etc for sending out emails, chances of landing them in Inbox will be more. You can use them as relay servers from Postfix. But the first two steps are anyway necessary.
Use Mailchimp if you want to sent emails to many people, for eg: for sending out newsletters, marketing emails etc.
Mail deliverabillty is extraordinarily hard to get right. You should consider leaving this to the specialists like Sendgrid or Mailchimp, and not spend tooooo much development time thinking about it
Another thing to check is that if this is a new server, you may need to set up Domain Keys to authenticate to Gmail. This happend to me and I was able to get my mail removed from the spam folder by following these:
https://help.ubuntu.com/community/Postfix/DomainKeys
https://help.ubuntu.com/community/Postfix/DKIM

Resources