Google Schema button not showing up when testing - google-schemas

I'm testing my schema button by sending to myself (I am overriding the
"From" email header address with my gmail address to test from the server that sends the email). Both recipient and sender are my gmail email address.
The schema shows up when I view the original email, but I don't see any buttons in my inbox.
Here is the script tag I am sending as part of my HTML email template:
<script type="application/ld+json">
{
"#context": "schema.org",
"#type": "EmailMessage",
"description": "User invited you to a test1.",
"action": {
"#type": "ConfirmAction",
"name": "Accept",
"handler": {
"#type": "HttpActionHandler",
"url": "http://localhost/?id=xxx"
}
}
}
</script>
Here is a screenshot of my inbox -- notice there is no "Accept" Gmail Action anywhere:
Here is a screenshot of the email itself, also not "Accept Gmail Action anywhere:

You need the sender to be your own email address and your emails to be signed with DKIM or SPF in order for Gmail to render the action. It seems like you are trying to "fake" your email address which is exactly what we need to prevent.

Related

How to send a mail using an alias email address using Office 365 Graph API

I can successfully send the email using the default email account (authorized account) by leveraging the Microsoft Graph API.
Now, I would like to send the email using one of the aliases assigned to the account. When I check the sent & received email it always shows the default email in the from address. I would like to see the alias email-id in the from address.
From the Outlook client, I can both send and receive email via configured alias.
Also, I am interested in updating the 'Name' shown for the from address. Always the email account has the same name as in the Azure AD.
Sample Message:
{
"Message": {
"Subject": "Subject Goes Here",
"Body": {
"ContentType": "Html",
"Content": "BODY GOES HERE"
},
"ToRecipients": [
{
"EmailAddress": {
"Name": "receiver",
"Address": "receiver#domain.com"
}
}
],
"From": {
"EmailAddress": {
"Name": "Alias Name ",
"Address": "sender-alias#domain.com"
}
},
"attachments": []
},
"SaveToSentItems": true
}

Slack API email_domain always blank

I'm using the Slack API method team.info, yet it seems to always be blank for all the teams I've tested it on. Is there no way to get the domain name of a team without using the users.list method to look at individual email addresses?
Here is a example response for the team.info method:
{
"ok": true,
"team": {
"id": "T12345",
"name": "My Team",
"domain": "example",
"email_domain": "example.com",
"icon": {
"image_34": "https:\/\/...",
"image_44": "https:\/\/...",
"image_68": "https:\/\/...",
"image_88": "https:\/\/...",
"image_102": "https:\/\/...",
"image_132": "https:\/\/...",
"image_default": true
},
"enterprise_id": "E1234A12AB",
"enterprise_name": "Umbrella Corporation"
}
}
The property email_domain contains a white list of domain names that people can use to sign-up on your slack and without needing an invitation. This is turned off by default and then this property will be empty.
The domain name of your Slack team can be found under the domain property. This is never empty. The full domain in this example would be example.slack.com.
Looking at the email addresses of your users may not always work, because people can use any email address for sign-up when invited.

Mandrill - CCed E-Mails Are Sent Separately

I make send request API calls with the following to property:
"to": [
{
"email": "recipient.email#example.com",
"type": "to"
},
{
"email": "another-email#example.com",
"type": "cc"
},
{
"email": "3rd-email#example.com",
"type": "cc"
}
]
I expect Mandrill to send out one e-mail based on the properties in the request above where the To field is recipient.email#example.com and the CC field is another-email#example.com; 3rd-email#example.com.
Instead Mandrill sends out three separate e-mails where every individual e-mail is designated to one person and the CC fields are treated as To fields.
Is there anyway to get Mandrill to send out one e-mail that respects the CC addresses as actual CC recipients?
Try set preserve_recipients option to true. According to their documentation it indicates
whether or not to expose all recipients in to "To" header for each email

Set Message-Id with Mandrill for bulk emails

I am sending emails to lists of contacts based on templates using Mandrill. I would like to track if the contacts have replied to my email and, to do so, I would like to check whether the Message-Id of my sent emails appears in the In-Reply-To header field of new messages.
The problem is that I have to generate and set the Message-Id manually since Mandrill only gives me their internal _id. However, since I am sending emails to various contacts at the same time, I set preserve_recipients to false. But then I can only set one Message-Id, which will therefore become not globally unique.
Here is an example JSON that I'm sending:
{
"from_email": "itsme#email.com",
"from_name": "Its Me",
"headers": {"Message-Id": ["<20150528161426.4265.93582#email.com>"]},
"subject": "Thesubject",
"text": "Thebody",
"to": [
{
"email": "john#email.com",
"name": "John",
"type": "to"
},
{
"email": "patrick#email.com",
"name": "Patrick",
"type": "to"
}
],
"preserve_recipients": false
}
In this case, two messages will be sent, but they'll have the same Message-Id. If I don't set it, Mandrill will automatically assign one, but then I can't retrieve it.
Any idea what I could do ? Maybe my whole approach is incorrect...
I ended up looping over all the recipients and generating a new Message-Id at each iteration and send one email at a time. Probably not optimal since I'm not using Mandrill bulk capability, but at least now I can store the email id.
import email
import mandrill
mandrill_client = mandrill.Mandrill('YOUR_MANDRILL_KEY')
for recipient in recipients:
# Generate RFC 2822-compliant Message-ID header
message_id = email.Utils.make_msgid()
m = {
"headers": {"Message-Id": [message_id],
"from_email": "itsme#email.com",
"from_name": "Its Me",
"subject": "The subject",
"text": "The body",
"to": [{"email": recipient["email"],
"name": recipient["name"],
"type": "to"}],
"track_clicks": True,
"track_opens": True
}
result = mandrill_client.messages.send(message=m)
From mandrill documentation you can retrieve the _id from the return value of the message.

Gmail Confirm actions (and roll-out schedule)

I'm testing actions with the Apps Script tutorial (with emails sent to myself), but currently only Go-To actions show up. This is the code I use to generate a Confirm Action, am I doing something wrong?
<script type="application/ld+json">{
"#context": "http://schema.org",
"#type": "EmailMessage",
"description": "Retry fax sending",
"action": {
"#type": "ConfirmAction",
"name": "Retry",
"handler": {
"#type": "HttpActionHandler",
"url": "http://example.com/do/ba98262b-6eb9-4314-a01a-8ff3076821e3"
"method": "POST"
}
}
}
BTW, is there any place in which we can check the status of roll-out of Gmail Actions? For instance, my Google Apps account does not show any action, while my "standard" Gmail account does.
You are simply missing a comma after the handler.url property, this is the correct markup:
<script type="application/ld+json">
{
"#context": "http://schema.org",
"#type": "EmailMessage",
"description": "Retry fax sending",
"action": {
"#type": "ConfirmAction",
"name": "Retry",
"handler": {
"#type": "HttpActionHandler",
"url": "http://example.com/do/ba98262b-6eb9-4314-a01a-8ff3076821e3",
"method": "POST"
}
}
}
</script>
You can use the Schema Validator tool to check your markup for syntax errors like this: https://developers.google.com/gmail/schemas/testing-your-schema
Go-To and One-Click actions are launched, while Review and RSVP are not yet. Please track the Release Notes page to get all updates.
For what concerns Google Apps accounts, please note that domain admins decide which track they want to be part of and that controls when they get the new features.

Resources