How can I setup an inbound action on an email incoming - email

I am developing an application, where I have a use case where I advertise a particular email id on a web site. Now, I need people to send me some information and an attachment to that email id . When I receive that email, it should trigger some action in my web application, such that I have both this document and the body of the email available to be in my web application. Then I can parse this information and take appropriate action. Let me know if it is possible to do this kind of email processing using Mandrill or Mailgun or SendGrid, and if yes, can you provide details/documention links on how this can be done.
Thanks
kabir

All three of those services support "inbound" email parsing, which should allow you to process and react to received emails.
Essentially they'll receive and process the email on your behalf, and send you a webhook with normalized data. Docs links below.
SendGrid Inbound Parse Webhooks
Mailgun Inbound Routes API
Mandrill Inbound Email Parsing

Related

How to track activity for a do-not-reply email in the SendGrid account

We are new in Sendgrid and we want to use it to track our system email but it did not seems to work with the new API key. The system are using do-not-reply email to track on the user activity.Can I know how can we authenticate this email to keep track on the activity in the SendGrid?
If you want to receive emails with SendGrid you need to do a few things. Here's an overview of what you'll need to do:
Get a domain that you want to receive emails on.
Set up MX records for a hostname on that domain to receive emails via SendGrid. Note that the hostname you choose (it can be a subdomain) should be used exclusively to parse your incoming email. The MX record should point to mx.sendgrid.net with a priority of 10.
Set up the webhook URL. In your SendGrid dashboard, click settings, then Inbound Parse and then Add Host & URL
Specify the receiving domain or hostname and a URL that will receive the webhooks when an email is received.
Save
The process of setting up the Inbound Parse Webhook is documented in detail here.
What you do with the webhook from then is up to you.

Is there a way to add a CC email address in SendGrid's Automation Email system?

I am currently building an automation email in SendGrid. The setup process seems very straightforward, but I can't find how or where to add a CC email address.
I've researched SendGrid's documentation and other sites to find a possible solution. Two sources had the right idea, but they provided examples using Node.js (see SendGrid Personalizations and Twilio Blog). I am needing to add a CC address inside SendGrid's Automation Email creator.
Does the SendGrid Automation system provide this capability, or is this best achieved through Node.js (or other background-handling languages)?
I don't believe that you can send an Automation with a cc.
You can track when Automation emails are sent to users by registering for the Event Webhook.
When users reply to the automation email and just get an email saying that their message was received, I assume that is because the email address you send the automation from is just set up to autorespond. You could set that email address up with the Inbound Parse Webhook so that you can trigger other events when you receive emails to that address. You could, in that case, send an email to your sales team, or register the response in a database, or forward the message to a CRM system.
If the only solution for you is to use a cc, then Automations may not work for you and you will have to send using the Mail Send API which gives you lots more control over the email being sent, but does lose the automation features.

How does SendGrid notify (delivered-open-click) events when multiple email recipients are specified

When you send an email through sendgrid, and the recipient opens the email, SendGrid will notify my server about that using webhooks (open) event.
https://docs.sendgrid.com/for-developers/tracking-events/event
But what happens if I specify multiple recipients for the same email with personalizations, do I get the same (open) event every time one of the recipients opens that email? If so how can my server figure which recipient?
What about the (delivered) event? Same questions.
Twilio SendGrid developer evangelist here.
The best way I found to achieve this is to send custom_args with the email, you can add custom_args to each individual personalisation object. Parameters set in custom_args are also sent along in the event webhook.
I wrote a post about how to use custom_args to track email statuses. The post uses Ruby on Rails as the framework, but covers using custom_args and reading them back in the event webhook to update the email in your own database.

Are there any Email Saas providers which allows creation of email ids using APIs?

For a project I need to setup either a mail server (like Open X-change, Kolab) or I can use email service as Saas from providers like Mailgun, Sendgrid etc. But my prime requirements are:
Create new email addresses using (Rest) API or any other API programmatically.
Ability to create huge number of email ids (more than 10,000)
I have researched and found some like mailgun provides facility of sending / receiving messages through APIs. But nothing was mentioned about creating new email ids using APIs.
Does anyone know any mail server / SaaS which provides the aforementioned facilities?
To have a mail id, you need to be able to accept messages at that location, which would be a full mail service such as Gmail.
If you just need to send "as" addresses, you can use an SMTP service such as SendGrid. You'd just need to make sure the domain is legitimate and can receive mail, and that you set the Reply-To value to something that you can accept mail at.

How to provide tenants in SaaS application with their #companyName.application.com specific email services?

In our SaaS application each company (tenant) is given their custom domain like companyName.ourapp.com
We would like to provide some email services like:
Ability to send and receive email notifications from info#companyName.ourapp.com and similar addresses
Ability to create new email accounts in clients' subdamains at runtime, programmatically, when needed. For example we would have separate emails created for each "opening" so that emails sent to this address would be parsed info would be extracted
Similar tasks
For now I just don't even know on where to look and how this could possibly work.
As far as I understand email it should be some kind of custom mail server (SMTP) serving all sub-domains and having API we can use to send emails, list and retrieve messages etc.
Please suggest how it may work and is there any components out there we can use to implement this.
There are three options for this.
Create an email server and programatically configure it to accept or deny the specific accounts. Then use cron to poll via pop3 or imap and download the messages for the account. You can then send them on for the customer or handle them in your web app.
Create a script that is fired by the email server as it receives each email. The script can then handle what to do with the email as it's received.
Use a third party to receive the email via HTTP Post at your app. Using CloudMailin for example would allow you to create a custom authorization filter that would call your app in realtime and determine if the given account exists and messages should be accepted for it.
I wrote a blog post for Rails about receiving incoming email, however the principals would apply to any programming language and framework.