Receive email at Meteor?

From the documentation ( http://docs.meteor.com/#email ) it seems that sending emails is pretty straight forward using Meteor. You just need to add the package, and then specify the credentials of the third-party email provider in MAIL_URL.

I'm currently trying to develop the ability to receive emails. We need this tool to say to unsubscribe from a user from our system or to allow users to enter data simply by responding to their email.

I just want to know what is the best way to do this? Is it possible to receive and analyze emails from my Meteor solution or do I need to configure something separate solution for this?

If this helps, I run a meteorite site with azure VM (in ubuntu), and our third-party provider is SendGrid.

+6
source share
3 answers

I am also an evangelist at SendGrid. The following is the procedure for receiving incoming email using our parse website at Meteor:

  • Meteor Setup - Packet manager for meteor. Installation procedure here: https://github.com/oortcloud/meteorite

  • Run mrt add router on the command line.

  • Next, modify your javascript to add a route:

Meteor.Router.add ({'/ inbound': function () {

post = this.request.body;

subject = post.subject;

body = post.body;

return [200, "Success"]}});

You can see a live example of receiving incoming email here: http://hook.meteor.com , and the source code for this is available here: https://github.com/kunal732/sgmeteor

Here is a blog post that I wrote on this topic, as well as for further reference, http://sendgrid.com/blog/receive-inbound-email-meteorjs/

+3
source

First you need to set up your computer (or another) to be able to receive email. This in itself is a task, not just super, and will include installing an MX record on your name server. This will require some reading. This may be a start to get started: https://help.ubuntu.com/12.04/installation-guide/i386/mail-setup.html

Once you can send emails to the server, you can use something like this to receive emails in node / meteor: https://github.com/mscdex/node-imap https://atmosphere.meteor.com / package / meteor-node-imap

If you prefer node.js to run an SMTP server to receive mail, you probably want to look at something like this: https://npmjs.org/package/simplesmtp

+2
source

If you want to receive email, you have 2 main options:

First option

First, configure your mail server to receive e-mail, save this message and access it. I would recommend Haraka to do this. You can install it on your server, run it, and then add a plugin like haraka-couchdb or haraka-redis to save emails in the database. Then you can simply query this database and pull out the contents of the email. Then you just need to take it apart. (I find this approach easier than installing an IMAP-enabled postfix and supporting it)

Second option

The second option is to use SendGrid Parse Webhook (since you are already a client with us - disclaimer: I am an evangelist developer with SendGrid). Here is a guide for beginners:

http://sendgrid.com/blog/parse-webhook-tutorial/

And an example application here:

https://github.com/scottmotte/sendgrid-parse-api-example

+2
source

All Articles