Rails 3 - Incoming Mail Ingest via email - ruby-on-rails

I want to have a stable way to allow users to email posts to my app. I've been trying CloudMailin but need something more reliable and high performance / fast to respond.
Any Rails 3 - heroku solutions out there that can handle Incoming Email Ingest?
thank you

SendGrid is another option. Here's the page from the documentation about parsing incoming e-mail.

Hi I can only apologise if you have been having issues with CloudMailin. Perhaps we could try and rectify the issues you have been experiencing. Contact us via email and we can look into things. Emails should be arriving within milliseconds of sending. If they are not then there is something going on.

Related

How to check for bounced emails in rails?

I'm currently creating an email app that is able to send emails to many users. However, I want to know whether there are bounced emails. I'm currently using Amazon SES to notify me if the email is bounced. However, I want the bounced email's data to be automatically entered into my Rails application instead of typing it manually based to the mailer daemons I get from Amazon. Is there are way to do so?
If you are willing to pay, this SaaS site called bouncely seems to provide an interface and an api wrapper around SES bounces.
send_email() returns a response object which can be interrogated for the response metadata.
Compare the status of this with the code you are interested in, perhaps a 550.
I couldn't find any clean existing solution for this, so I wrote a gem (email_events) that allows you to put a email event handler method (including for bounce events) right in your mailer class: https://github.com/85x14/email_events. It supports SES and Sendgrid, so should work for you if you still need it.

Rails 3.0 Mass Email

I'm building a web application were users need to ability to send out mass emails. The application is a ticket site where individuals sell tickets to various events. In turn, events have promoters that sell tickets. The sponsor of the event needs to ability to send mass emails to their promoters. An event may have hundreds of promoters. So I'm assuming looping through each promoter and sending an email wont cut it.
Does rails 3.0 provide some kind of mass email functionality?
Thanks,
Brian
I don't think you should have a problem looping through all the promoters and sending each one an email. However, you would want to do that as a background process.
Check out delayed-job or http://www.simpleworker.com/. Both of these will let you load the email into a background job, and allow you to redirect the user in a timely manner while the emails get sent in the background.
Solomon is right, you'll definitely want to do this in a background task, which is pretty simple with something like delayed job. Have you thought about how the messages will actually be delivered though? What mail server you are going to use? Many providers won't let you send out hundreds of messages at a time, and you are likely to run into spam issues if you try to send that volume of messages from a personal email account. You may want to take a look at a service like Mailgun that specializes in this. From their FAQ:
Why not just use Sendmail + Postfix + Courier IMAP?
You can but you should be aware that there is a constant battle raging
between good and evil (i.e., spam) in the email universe. In order to
be on the 'good' side of that battle and get your email delivered
there are numerous things you need to do. You need to have the right
infrastructure and register your IP and Domain appropriately. Also,
you need to have a history of email sending that complies with ESPs
rules in order to build a good reputation.
Moreover, if you are going to receive, store and host emails, you
better be prepared for maintaining this orchestra of software, take
care of backups, hardware failures, security patches and monitoring.
Stop kidding yourself, it's not 1998 anymore.
I'm not affiliated with them in any way, but in my experience getting rails to send email is trivial compared to dealing with getting it delivered successfully by the mail server.

Sending out lots of mails from Rails - what are people using these days?

In other apps i've used ar_mailer to queue up mails and ar_sendmail to take them out of the queue in a seperate process. I've not been massively happy with this setup: the ar_sendmail process seems to silently die fairly often, and in the default configuration mails are deleted out of the emails table when sent: i'd rather keep them for future reference and just mark them has having been sent.
I'm adding emailing into another project now (which uses rails 2.3.8) and am wondering what other solutions have people used in rails for bulk emailing?
Grateful for any advice - max
I think the prevailing opinion is to use a bulk e-mail service like MailChimp (http://mailchimp.com) or Amazon Simple Email Service (http://aws.amazon.com/ses)

Processing all the email sent to a specific domain

Requirement:
I am writing a web application (Rails on Heroku) through which users can create groups and user should be able to post a message to the group simply by sending an email to the group.
This is what tumblr.com does: each blog is associated with an email address(randomly generated) and user can post to the blog simply by sending an email. Also posterous.com has this feature.
Question:
What is the best way to architect a solution like this one? Comments? Ideas?
I see 2 ways of doing this:
1) Hosting my own email server (sendmail or postfix) on Amazon EC2 and having some script to process all the incoming email?
This will give me a lot of control but an email server to maintain.
2) Have the email server hosted somewhere and just have to write the email processing script would be nice however I do not know of any email cloud service to which you can tell: "please accept all the email for mydomain.com".
Thanks in advance for any help.
I think I am going to go with http://cloudmailin.com. They even have a nice Heroku plug-in. It would be nice to hear any good or bad experience from somebody that tried this out.
You could have the emails sent to GMail through their SMTP servers and run some sort of crontab to pull down the emails from GMail, and process them from there.
They do allow you to have emails sent to your domain.com, see this page:
http://www.google.com/apps/intl/en/group/index.html

reaching Gmail SMTP daily limit

In one of my Rails applications I'm sending emails through the Gmail SMTP server and everything just works, mails are not going to spam and so on ... But there's one thing that concerns me, the 500messages/day limit the SMTP has, currently I'm over 350/day. I didn't find any official Google page where they talk about the subject, just blog posts that seems to be reliable. Then my question is what do you suggest me in order to be able to send more than 500messages/day? I would love to keep using the Gmail SMTP.
Any help would be appreciated.
Don't use GMail for what it wasn't built for. It wasn't designed as a mass-email system, although Google definitely has the firepower to do this.
Instead, perhaps use something like SendGrid to send your emails. SendGrid is designed for this and is just as easy (actually, probably easier) to set up with than GMail.
You can consider using more than one gmail account to access the smtp server, however you may have problems with ip limits (couldn't find anything on their docs about it). Another option is performing dns mx lookups yourself and reproducing your own smtp server by directly delivering the messages to the user's emails - but that can increase the odds of you being tagged as a spammer as your ip is not whitelisted as sender.
I think the best way is to create another gmail account and trying to reroute your connection to use it when one of the accounts reaches the daily limit. A vpn connection can solve that for you.

Resources