How to send Hyperlink with spaces in Sendgrid - sendgrid-api-v3

I use sendgrid service for my application for sending email.
In the email, I am sending a hyperlink that contains space.
<a href={{here}}>here</a>
here = https://example.org/transport/?user=sam&type=bus ac&org=abc
In query parameters with type, I'm getting it from the scroll selector.
when I get the mail the hyperlink is navigating only till
https://example.org/transport/?user=sam&type=bus
Is there a way I could navigate to the provided URL?

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.

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.

AngularJS third party authorization in new browser window

I am facing some difficulty with AngularJS and opening a new window(window.open('URL'))
Consider the scenario, I want clients on my web-app to authenticate via third-party services like Facebook, Stripe, etc.
I have my web-app built in AngularJS and bootstrap.
On click of 'Add Account' button, I would like to open a new window with the respective URL. Everything upto here works.
But when I try to access the window object from the parent web-app, it gives an error: Blocked a frame with origin "http://localhost" from accessing a cross-origin frame
I need to access the child window URL from the parent to detect URL change, and I also need to access the content of the child window.
So the whole workflow is
When I click on 'Add Account' from my web-app
A new window opens, which hits a URL on my Server
Which then calls the Stripe Authentication URL
The User signs-in with his Stripe credentials
After successful signing in, Stripe auth redirects the callback to my Server
Which then sends a ACK = Success
I then read the ACK from my web-app(parent)
After receiving the ACK, and checking it, close the new window which was opened
Please help !!
One way to do this,
You can have an intermediary page which opens the URL on your server. The server url returns with a hashtag #success or #error after the authentication with the third party page. The intermediary page loads again and looks for the hashtag and calls opener window.

AppEngine gmail - missing email in chat message

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).

Send user to their email client

I recently was on twitter and needed to reset my password. When click send to send your email a reset password, it routes you to another url with a button saying "Go to my email"
I am using AngularJs and want to be able to use this feature of having user click a button to go to their email client! That is so cool! I cannot find any examples or documentation on how to do this. Any ideas on how you could send a user to their specific email client AngularJs?
The only way I could see of achieving this would be writing a controller that would have some information like this: "if email ends in #gmail.com = route to 'https://www.gmail.com'"
You have two options: 1. Create a link, as you mention, to the appropriate client based on the email address, or 2. Use a mailto link, which will open the user's default email client. So, it really depends on your use case to choose the appropriate method.
In terms of the link to the email, you can either create a map of email address and urls:
{
'gmail.com': 'https://www.gmail.com',
...
}
Or, you could probably get away with splitting the string at the # and just tacking www. to the front of it to serve as a link.
Other than that, the browser gives you no other method.

Resources