how can i send a json+ld schema.org email to myself in gmail - gmail

gmail recently announced schema.org support for in-app and one-click actions. They note that one can immediately test out the schema by sending an email from oneself to oneself i.e. from x#gmail.com to x#gmail.com (1)
My question is how do i send an email with the json+ld schema.org markup - I can only send text and/or html and if i try to send using mailgun / sendgrid etc. than the email won't be from x#gmail.com
So, how do i test this??
(1) https://developers.google.com/gmail/schemas/registering-with-google

Many options, three that come into my mind right now are:
use the Apps Script Gmail service, as shown in our Apps Script quickstart guide
use App Engine as in the end-to-end example in the documentation
connect to Gmail via SMTP to send emails from there

Related

Gmail API: filter, edit and then forward an email

Is it possible to create a filter for a certain email, to automate an edit of the email's content and then forward to a list of addresses?
Explore this documentation to help you started.
The Gmail API is a RESTful API that can be used to access Gmail
mailboxes and send mail. For most web applications (including mobile
apps), the Gmail API is the best choice for authorized access to a
user's Gmail data.
The Gmail API gives you flexible, RESTful access to the user's inbox,
with a natural interface to Threads, Messages, Labels, Drafts,
History, and. Settings. From the modern language of your choice, your
app can use the API to add Gmail features like:
Read messages from Gmail
Send email messages
Modify the labels applied to messages and threads
Search for specific messages and threads
Create filters to automatically label, forward, or archive messages

Mails sent via smtp.gmail.com or Google Client API and DKIM

I'm currently experimenting with Google Email Markup sent via PHP. I'm letting users authenticate using Google_Service_Oauth2 and then send a mail from their mail account to themselves using Google_Service_Gmail and users_messages->send('me', $encodedMessage).
The markup itself checks out valid in the Email Markup Tester. And HotelReservation and FlightReservation types even show up fine in Inbox. But all other types don't show up as cards.
After poking around I found a few comments that this might be because of a missing DKIM signature in those mails. And yes, when I send the exact same HTML (I'm using Microdata markup.) using the Gmail Actions Tester, the mails have DKIM signatures and the cards appear as expected.
This is, although the Markup documentation clearly states:
All emails where the sender and the recipient are the same account ignore the registration requirements and can be used for self-testing.
And I didn't want to setup some mail proxy in Google Apps Engine just to get that DKIM signature.
So how can I send mails to myself using smtp.gmail.com or the Google Client API and get a DKIM signature added by GMail?

Can gmail (smtp.gmail.com) post incoming mails to my application instead of my applications pulls the mail?

I am using smtp.gmail.com to send mails.
I want to read/parse mails in my application.
I know how to pull the mails, there are API libraries to handle that. It is bit over do for my application.
Instead, is there any way gmail can post mails to my application like sendgrid does ?
If you want to get emails from a gmail account, and want a webhook to do such, you could use Context.io's Webhook Feature.
However, at the maximum volume you'll be able to send out with Gmail, I'd recommend looking toward an email service provider's free plan. If you're familiar with SendGrid already SendGrid's Free Plan will give you access to both low volume sending, and the Parse webhook. Other email service providers will give you the same functionality on their free plans, as well (e.g. Mailgun).
Disclaimer: I am a SendGrid employee.

Mails for verification using Nodemailer

I want to use node-mailer module to send emails to registering users on app for verification and other purposes also. I am not sure which transport mechanism to use so that emails I send are not a spam and also get delivered.
I also want to use the same domain to receive emails regarding support and bugs(i.e lets say on email on support#example.com). I am planning to set-up google apps account for this. Basically I will set-up the google apps account with me being an user and having an alias support#example.com. So can I also set-up an alias with say admin#example.com and send the emails using nodemailer from my app using this email address? But obviously I don't want to store my email id and password for google apps in the code for security reasons. So how Should I do it?
Other option is to Amazon SES, I believe its a good service and would be very useful. But can I use the same domain name for serving email from AMAZON SES and google apps also being able to host my app? So how to send emails from AMAZON SES by authenticating SPF and DKIM so that these emails reach the inbox of the user.
Saransh,
You absolutely can use the same domain and email address with both Google Apps and AmazonSES without any issues. When it comes to receiving emails, all messages have to be directed to a single server (your MX records). But sending email is very different in that you can send email from many different sources without any issues.
To ensure your messages don't go to the SPAM folder just be sure to properly authenticate all your messages with SPF and DKIM. I'm not sure how this works with AmazonSES, but it was really easy with the provider that I chose for my email http://socketlabs.com

Retrieving emails from gmail

I've been using Oauth for G-mail to get the emails, it's going perfectly until I faced a problem that after following the Goggle playground for Oauth
the last response contained the emails as I want except than that I want the Full content of the email, not only the summery ...
what I'm missing ...?
The example flow there is for using an unread messages feed with an aggregator/RSS-reader software. Google has decided to only include the summary and a URL to view the message on the Gmail website there.
If you want download the message contents you have to fetch them using IMAP. Google also supports IMAP using OAuth authentication.

Resources