AppEngine gmail - missing email in chat message - google-app-engine

Is there any reason, why I don't get email along with chat message retrieved by gmail.users.messages.get? When I try to execute the request via API explorer I can see the email in "From" field of the MessagePartHeader, however when I try it programmatically, the email is missing (using the same paramters as in API explorer).

Related

azure logic app not able to retrieve who is the approver after approving the mail(UserEmailAddress- showing Null)

I have created a flow using logic apps where once the owner approves the mail I need to know who approved that mail. While using normal my account I am able to retrieve the user who approved the mail but while using the service account am not able to retrieve the values. All the values its showing as null while using the service account.
How do I get the --> email address <-- of the user that selects 'Approve' or 'Reject' buttons in the email? If an email is forwarded to another person I would like to know who (email address) clicked approve or reject.
After reproducing from my end, I observed that when the mail is viewed in HTML format this doesn't work and also while forwarding the mail, but this works when the response is sent through the adaptive cards and not the HTML message that are received during the Send email with options action. One way that this can work is when you use only the adaptive cards that are send as the request.
RESULTS:
and when you use HTML responses then below is something how you'll be receiving the response.
You can also try Creating your own actionable messages for Flow Approvals by StefanS365 where in you add provider in Actionable Email Developer Dashboard and request the approvals.

Opening gMail Website to a specific message

I'm using the gMail Node API to search for specific messages (not drafts) using the gmail.users.messages.list API, then I use the gmail.users.messages.get API to get the details for the message.
So I have the message id, thread id etc.... in the payloads returned. I present the user with the subject line from each message and I would like to also give the user a URL that will open the message in the gMail website.
If I use the gMail website to open one of the messages that are in my test bed the URL for gMail is:
https://mail.google.com/mail/u/3/#inbox/FMfcgzGljlhhRnrLbTDqXnNxSbhRcVCN
I could easily put that URL together myself but here are my questions:
Will the '/u/3/#inbox' portion of the URL always be the same for the authenticated user?
How do I get the ID at the end of the URL(beginning with FMfcgz...)? I searched the payloads from the API's and I cannot find that ID in any of the data returned.

Azure Logic App: How to keep embedded image in email body when forwarding on?

I am setting up a bulk emailing solution combining Logic Apps and SendGrid.
User sends email to a mailbox with attachment of required recipients > Logic App reads email > LA resends 'Body' via SendGrid for each recipient.
This works fine with a plain email. However, when an image is embedded within the body Outlook uses Content-IDs.
Currently the body of the email just says a broken image symbol.
How can the images be kept for the re-sending on?
enter image description here
If you want to implement it directly, it could be done. Because if you try to get the mail body you will find it's like below picture.
The body is escaped mail content and the image content is the contentBytes under attachments it's a base64 code.
So if you want to send a image from another mail you have to get the base64 code embed it to your mail. I use the outlook trigger to test it and send with sendgrid, the content will be like this code.
This is test email <br>\n<img src=\"data:image/jpeg;base64,#{triggerBody()['attachments'][0]['contentBytes']}\">
I test this way could send the image, and it could be seen in the mail. If this is not what you want please let know.

Facebook Messenger Bot cannot send message to a given ID not working

I want to send message to a user any time using facebook messenger API.
I'm using developer version of messaging app and has not submitted for review yet.
We are two friends both as developer in the app. I want when my friend sends message to my page, Bot replies and a copy of message sent by friend comes to my inbox. But when I tried api throws following error.
{"error":{"message":"(#100) Parameter error: You cannot send messages to this id","type":"OAuthException","code":100,"fbtrace_id":"HRTLdvidA4u"}}
Is there any solution.
Thanks.

How to forward emails from Google Apps (Gmail) to Sendgrid?

I am trying to use Sendgrid as SMTP server for sending all emails from my users using Google Apps for email.
The catch is that Sendgrid requires password authentication and i couldn't find a way in Google apps Admin console to out that in (theough of coruse, there are ways to enter the SMTP server IP, but it doesn't work).
How to hook SendGrid to Free Gmail account (Not Google for work account)?
See: https://support.google.com/mail/answer/22370?hl=en
Click the gear in the top right.
Select Settings.
Click the Accounts and Import tab.
Under Send mail as, click Add another email address.
Click Add account >>
Give a descriptive name to this new "email transmitter" (e.g. "Send mails via SendGrid")
Give any email address that belong to you but not a GMAIL email (e.g myemail#mydomain.com)
Uncheck the Alias check mark
Change your SMTP to smtp.sendgrid.net
Use ports 587 for plain/TLS connections .
SendGrid username (sendgridname)
SendGrid password (sendgridpassword)
Gmail will send you a verification email to the "transmitter email" (e.g to myemail#mydomain.com)
Open your other account (mantas.hof.hefer#hhcc.org.il) and either click the link in the message Gmail sent or enter the confirmation code in the Accounts and Import section of your Gmail settings.
Whenever you want to send email from Gmail via SendGrid when you compose the email, in the “from” field select the SendGrid email (rami via SendGrid).
The will be send as like it has been send from the “email transmitter” (e.g it will send to myemail#mydomain.com).
Type the verification code and you are set.
Next time you want to compose an email from Gmail please select the field "FROM" and choose the new "transmitter email" (e.g. "Send mails via SendGrid"). Write your email and send it. It will be send via SendGrid.
If you login into your SendGrid account you can find many statistics on this email such as how many people have open this email. (https://sendgrid.com/logs/index).
The only thing that I couldn't figure is how use the SMTP protocol from GOOGLE JAVASCRIPT (not java) in order to manipulate my emails.
There are many SendGrid SMTP commands that can be added to the message headers but I couldn't figure how to do it.
The sendgrid API auth's from within the request. Simply use UrlFetch to send POST requests containing your API creds to the sendgrid endpoint.
If anyone comes across this answer as I did via a Google search, this update might help. The answer provided by #rmisegal is basically correct but you now use an API key from SendGrid.
You can setup an SMTP email API key via the SendGrid dashboard:
Log into your sendGrid Account.
Click on your account name in the top left of the dashboard and select Setup Guide from the drop down menu.
Press the start button next to the "Integrate using Web API or SMTP relay"
Follow the wizard steps to create your API key.
Follow the instructions provided rmisegal except provide a user name of apikey and use the apiKey from SendGrid as the password.

Resources