From the documentation (http://docs.meteor.com/#email), it seems sending email is fairly straight forward with Meteor. Just need to add the package, then specify the credentials of your 3rd party email provider in MAIL_URL.
Currently, I'm trying to develop the ability to receive emails. We need this facility to say unsubscribe a user from our system or allow users to input data by just replying to their email.
I just want to know, what is the best way to do this? Is it possible to receive and parse the emails from within my Meteor solution or do I need to set up something seperate solution to do this?
If it helps, I'm running a meteor website off an azure VM (in ubuntu) and our 3rd party provider is SendGrid.
Meteor is a full-stack JavaScript platform for developing modern web and mobile applications. Meteor includes a key set of technologies for building connected-client reactive applications, a build tool, and a curated set of packages from the Node. js and general JavaScript community.
I'm also an Evangelist at SendGrid. Here is the procedure for receiving inbound email with our parse webhook in Meteor:
Setup Meteorite a package manager for meteor. Installation procedure here: https://github.com/oortcloud/meteorite
Run mrt add router
in 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 inbound email over here: http://hook.meteor.com and the source code for this is available here: https://github.com/kunal732/sgmeteor
Here is a blog post I wrote on the topic as well for more reference, http://sendgrid.com/blog/receive-inbound-email-meteorjs/
You will first need to setup your machine (or another one) to actually be able to receive email. This in itself is a bit of a task and not super straightforward and will involve setting a MX record on your nameserver as well. It will require some reading. This might be a place to get started: https://help.ubuntu.com/12.04/installation-guide/i386/mail-setup.html
Once you have the ability to send email to the server you can use something like this to retrieve emails into node/meteor: https://github.com/mscdex/node-imap https://atmosphere.meteor.com/package/meteor-node-imap
If you'd rather have node.js itself run a smtp server to receive mail, you would probably want to look at something like this: https://npmjs.org/package/simplesmtp
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With