How would I parse an email and extract flight reservation details (if it exists)?
I'm only looking to parse Gmail emails right now, so if it specifically uses the Gmail API, that's okay.
Though I had a look at the Gmail API (https://developers.google.com/gmail/api/v1/reference/users/messages/get), and tried the API on a specific message from my inbox that contains the flight reservation popup on the webapp, and couldn't find anything flight-related in the API.
So how would I do that in the generic case? By parsing directly the email body? Is there a library for that?
Thanks.
Related
Well, how can I get all senders in user's mail using Google APIs? I need a list of emails (and other ex. information). They are not in user's contacts cause he need to add them before. So there can I find this list?
I need to get a full list of people which write messages to user's email.
I want to get email addresses from my account with API. I can get those emails from my contacts, but don't succeed to get those emails who are not in my contacts, but I had email conversations with them before. From where I can get any doc or information how to get that information from API?
I think your only option is going to be doing a user.messages.list loop though each message and run a user.messages.get and check the sender email address.
The API doesn't return the the information you are looking for. You could also just start adding these people to your contacts.
Its an interesting idea you may want to submit it as a feature request. Issue tracker
I am trying to figure out how can I make it possible to send an email from my
application to Sendgrid and have it come back.
I want to use coldfusion to send an email using X-SMTP API. I found a documentation
online here but still wondering if there's any documentation available other
than the web API one?
http://thehatrack.net/blog/integrating-sendgrid-with-your-coldfusion-application/
SendGrid's Event Webhook is the only way to get email reads on an individual basis. This will POST an event to your server every time an email is read (among several other events).
The only "pull" based solution to get individual email events from SendGrid is the bounces endpoint, which will tell you when an email bounces (and is certainly not read), but nothing else.
If you want to retrieve individual read events from SendGrid, you'll need to connect the Event Webhook to an external service like Keen.io, and then leveraging their API to get individual events.
What is the best way of tracking responses for email campaigns? I was thinking on adding something to the reply-to field of the email (for example luqita+campaigns#stackoverflow.com), but I'm not sure if there is something more neat that could avoid this?
I thought about headers too, but it's important to note that the address luqita#stackoverflow.com would send many different campaigns, and the 'in-reply-to' header info would not be useful then to differentiate (while using luqita+campaign1 or luqita+campaign2 could)
What can I do?
So you want to be able to execute some logic when someone replies to an email you have sent through SendGrid? If you have access to change the MX record of the domain of the email address at which you want to receive the replies, you could use SG's Parse API to get a POST request to a script whenever email is receive at the address.
I think you would indeed have to set a magic reply-to address for each campaign. This seems like a perfectly fine solution; it's also how SG itself tracks bounces - it sets the return-path to something like bounces+{attempted-recipient-email}#sendgrid.com. Then examine the 'to' parameter of the POST notification you receive to know which campaign the reply is associated with.
When you say "tracking responses", do you mean that you expect users will reply to the Email, or do you mean that they'll click on a link in the Email and interact with a web site?
SendGrid obviously offers click tracking and open tracking, and you can set up to 10 different categories for tracking campaign stats and see delivery/bounces/opens/clicks/etc based on those categories. They also have a Google Analytics plugin that can feed back some analytics data to Google. And as #LinusR mentioned in his answer, the SendGrid Parse API can be set up in a way that reply Emails can get parsed and posted back to your site.
If the user will be interacting with your web site, you can use the "unique args" setup at SendGrid to set a unique string/hash to append to any URLs that can help identify a particular user, campaign, or whatever else you want to track.
I want to create a new software that can be controlled by email.
It will work like followup.cc or followupthen.com.
The users of these softwares can give commands to the system by using only email. For example, sending an email to 1minute#followup.cc sets the system to send a notification email after 1 minute. Or sending an email to 4weeks#followup.cc sets the system to send a notification email after 4 weeks.
I have never seen an example for implementing such an email user interface. I don't know where to start. Do you know of any good tutorial or open source code that I can take as example?
Note: I appreciate anything useful but my preferred programming languages are python or java.
Use the SubEthaSMTP library to receive mail. That gives you the SMTP envelope information: reverse-path (usually the sender's email address), recipient and message content as a stream.
Based on your question it seems that you do not need to parse the message (for example to retrieve the subject), but if do need, then parse the mail using the JavaMail library.
You can find example code in the SubEthaSMTP wiki pages. A more complex example is SubEtha Mail, a mail list manager.