org-mode messing up a URL from Outlook Web - emacs

I have a Zapier zap that takes an Outlook email from a folder, and appends a text entry in an inbox.txt file in my Dropbox, which I then convert to inbox.org. The text entry has the email subject as the TODO headline, and the note has the Outlook email URL from Zapier plus a body preview.
When I click on the URL link in org-mode, it does not work. For some reason, org-mode is screwing up the URL when it passes it my Chrome browser (I am on a Mac, using the latest Emacs for Mac version).
Here is an example. The "GOOD" URL is what is actually in the inbox.org file as seen in Emacs. If I manually copy and paste that URL into Chrome, no problem. But, if I simply click on the URL in Emacs, the "BAD" URL is what appears in the browser. Notice how some characters are different.
Anyone have clue? . I also use Beorg on iOS, and it correctly opens the link on my iPhone.
GOOD
https://outlook.office365.com/owa/?ItemID=AAMkADI2ZGEzMWMzLTVkOTItNGRkOS04ZjkzLTVmODUzNDZhMjE3OABGAAAAAACfpz95dsWeQ5i6qmcPiDh6BwC6Rj4Y9RfWRZ26IgJTOwZ1AAMJ4B%2BqAAC6Rj4Y9RfWRZ26IgJTOwZ1AAMUEGjBAAA%3D&exvsurl=1&viewmodel=ReadMessageItem
BAD
https://outlook.office365.com/owa/?ItemID=AAMkADI2ZGEzMWMzLTVkOTItNGRkOS04ZjkzLTVmODUzNDZhMjE3OABGAAAAAACfpz95dsWeQ5i6qmcPiDh6BwC6Rj4Y9RfWRZ26IgJTOwZ1AAMJ4B+qAAC6Rj4Y9RfWRZ26IgJTOwZ1AAMUEGjBAAA%3d&viewmodel=ReadMessageItem&exvsurl=1&path=

I assume this has nothing to do with Orgmode itself, but how your browser interprets the url you hand over from emacs. The "plus" sign is not encoded (%2B) and therefore your Browser does not just leave the "plus" sign in the url but interprets it and normally turns it into a space.

Related

All of <a> tags were broken on outlook

All of tags are changed to the below type of string on outlook web browser
[www.frimetime.com/verify/9026151fe8ddd0db4a9cb84e2ac0e7ce1a07ccd1be100896b2772e620b74ac16]Verify Now
It has to be.
Verify Now
** The thing is it is working on Google(web browser) or mailbox as well **
The email server is using AWS smtp service.
The prefix and type has to be defined
https:// or http://
How to Copy a URL
You can copy a website link in most desktop web browsers and other programs by right-clicking or tapping-and-holding the link and choosing the copy option. If you're using a web browser, the URL is located at the very top of the program, likely above or below the open tabs or bookmarks bar.
The link should look something like this, with http:// or https:// at the very start:
Outlook web will do that for any links that do not have a protocol at the start of the link, i.e. http:// or https://.
I.e. you need Verify Now

Signed url not working for Microsoft online ducument viewer

Go to this page:
https://products.office.com/en-us/office-online/view-office-documents-online
If you paste a url of an office document(e.g. http://ieee802.org:80/secmail/docIZSEwEqHFr.doc) to the input box and click "create url", it will generate a url which allows you to view the file in browser.
However this doesn't work for a signed url:
https://test-sam-sydney.s3.amazonaws.com/561/smartlibs/141/entries/16288/files/32683/aaa.doc?AWSAccessKeyId=ASIAI37CPWZSXOXMYGWA&Expires=1509595541&Signature=czEeo7dko8%2Fj96AYX9HTK5dV8IU%3D&x-amz-security-token=FQoDYXdzEP3%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDJ%2FRBcrYuZWaVCkhTSKoBvKIryDttKvnIMTdcNvRwlURajDqOsmDn2AGGWfuh%2BfXAZ9HkMHbP7boPcPaz2n1YG0HibDeuVp1haOBqxjylleC0XtSCIYF6zOGGP9TYAoncUx29z3NDL4tVdfkvxus8kV8sCuMPleiocAkIYeWnfTAGIc%2B7bDzx4DlkOaBtmYpY5XFWGJTGhS7kN%2Bv8qYE53gbWI0yv6w7SDC8bREW8EgH0Nt4Zi5i87psPgjAqmW9JypIcUdIKY%2FhZ7%2BE9Cmpvvqwt2t8aYFAT2X5FVgTQbImFcJrRTjx3kDNJgrI6TVpoC1kKt%2B15EBjYYWP9XECfFGeID%2F3MqluU4XBagHZ45vI5phska6nLyyWHq0%2FgGK06lLW%2BPJpCl%2Bg2u2XEy%2B%2FaqoNhoWNKeo7YQ9IP9LS2rkqZJ5Wm4RzD6VDV0waUDOOCR0iwQl9C8bkhFLxi6cYv6MViO5EYxZygaxmtKh%2FVC1BcoRL4XRq6WP%2BHIQiVaA67PXfyMspoGk3Wn31zwhAGsRRi2%2Fh5kEiJ7wXw%2FYCppokL7VBogEDIyuv5HgXtOLsPvMsEdbwEvNNLYYvTMmby911%2FChbzLVgn7I4ui1C5eqwJosZWyjwbQWrwzvNPYi9xqty%2B9Fja3YlmMUUjBe5eDkKzPEUDGZ28beckUU%2FhDptseaZDehmmsODwQd5AFmJ0MUdXH6E333N3rgLo%2BvmSptLrRcd%2BIfpiV8cNdMyXsK3k2%2FSblpRA5rMsP4gbMiveXMmHGtcsonjMipuyjWReWb5z5S%2BcIeeZLjOVBDtqyYdixDsqj62q9K5qGRPiKBeWHO6IP9IzqM4EY8GfKpVy2GEE30tdx9MB94pQmQSMNEUigREYuELKvrS4kbUXiTNZ635pqxEDeBq%2FHP3iOlodbvqIEFeS0iG2X46Sc%2FZ1sixPW1umvNkNJCABjHcPvupIWwzqdiA6N6V%2FTb%2FVZHbBBHqkv4quBn8xGm3LORiuEsXRoRTVMeor2sdOu6nhJuAHz9IpdPvnqQ4mExsBWOY4lMD5sOZ1PoGuDThbcDFc4LfBK96jRC8KCF%2BEiP1FUjVhtw4nkMhpq0ojazqzwU%3D
It expires after 15min so by the time anyone sees this it must have been expired, but I guarantee it is a valid url and if you paste that in browser it will download that doc.
This was working about 2 months ago, but not working now, I wonder if Microsoft has changed something, does anyone know the reason?
I was having the same issue. Eventually, I found out that the URL was not being encoded. The signed url introduces characters to the URL that must be "escaped" or encoded for the Microsoft Office Viewer to be able to read them. See this other question for more information.
I had to encode it with encodeURIComponent()
Note that encodeURI() will not fix the issue. It does not encode as many characters that encodeURIComponent does.

HTML Email Not Generating Links (A tags) in Outlook

In checking an email that I am coding (a reply-type email that my server will send), I notice that the a tag hyperlinks in my code are not working in Outlook. They work elsewhere, but not Outlook.
I know very little about Microsoft products, but I can tell you that the place I'm seeing this is in the online outlook.com you view in a web browser.
The simplest link, such as this...
Click here
...is coming through like this in the rendered email:
[http:www.yahoo.com]Click here
AND, it is not a link. It's just text. It appears as though the program is disabling the links (possibly because it finds the email suspicious of phishing, even though I added the domain to my trusted emails)???
Anyone know what is happening or how I can work around this?
I don't see anything wrong with the code you've posted, but I do know that Outlook.com will do this to links when it doesn't recognize them as valid links to an external site. Look for hidden characters, "smart" quotes instead of plain quotes, etc. in the link.
You should put the target on the link.
Like this:
Click here

URL encoding issue in email campaigns

BACKGROUND:
Sitefinity CMS for my specific problem, but could be general too.
I have an email message which has an unsubscribe link in it like this:
To Unsubscribe: Click or copy paste the following link in your browser.
https://www.domain.com/unsubscribe?mailingList={|MailingList.Title|}&SubscriptionEmail={|Subscriber.Email|}
{|MailingList.Title|} and {|Subscriber.Email|} are sitefinity CMS subscriber fields. When I send out an email these two fields resolve to their respective values. Hence, the URL I get in an email is as following for example.
https://www.domain.com/unsubscribe?mailingList=mymailingList&subscriptionEmail=abc#xyz.com
The user can click on it and unsubscribe from the mailing list.
My Problem:
If the mailing list name has a space in it, the link that appears on the email is broken at the first occurance of the space(link the link shown below breaks immediately =my) and hence clicking it is like clicking a invalid URL.
https://www.domain.com/unsubscribe?mailingList=my mailing List&subscriptionEmail=abc#xyz.com
I dont understand why the space in the URL doesnt resolve to a %20.
My Trial:
I changed the order of the querystrings to see if it works(mailinglist was the last string originally, I put it in the middle)
I am fine if the URL does not get resolved into a link at all, just forcing the users to copy paste the entire URL. But, I was not able to do it as well.
I have read in microsoft forums that OUTLOOK resolves the spacing issue, when the URL is surrounded by < and > like this :
URL here:
But the URL doesnt even show up in the email just like it is not showing up here above this line.
Tested on OUTLOOK, GMAIL, YAHOOMAIL, MICROSOFT MAIL. The link is broken in all email clients.
Any suggestions on what is the best solution for this?

Open iPhone App from an Email Link

I've working on a program where an email is sent to a user, and a link to open the iPhone app is embedded in the email. The problem is that when the user clicks the link to open the app, mail has stripped out the colon, so the link no longer works!
The link being created basically looks like this:
#"<BR><BR><BR>Open App"
But the link, when clicked in the email, opens this in the browser instead:
myApp//
with no colon, so the app doesn't launch and the browser says it can't find the page.
Any ideas how to fix this? Thanks!
It just should be:
#"<BR><BR><BR>Open App"
As a workaround for custom urls being blocked by gmail, what you could do is set up something like http://myapp.mydomain.com/ up do redirect to myapp://... That way it'll look like a normal domain but open your app. On the plus you will be able to see how many people click your link, though on the down side it'll pop via Safari first.
Add 'http:' to all your images and urls, iphones dont recognize links w/o that. also use single quotes for them(').eg.
<a href='http://xyz.com'></a><img src='http://xyz.com/pqr/abc.jpg'></img>