The mailto link leaves an empty receiver when trying to adress a custom group.
#group-support
The customized groups start with #, do I have to escape this char in any way? Removing the # would work, but that isn't going to land in the correct mailbox. The problem occured in a SharePoint site, eventhough it seems to be a html propblem.
Apparantly %23 for # will do the trick in utf-8.
Related
I am helping someone working in operations to set up an email signature which includes a link to escalate to a higher official in case of any displeasure. While I can use a mailto: to link to the official's email id, I want to also capture the subject of the email to capture details like Service Ticket number and any other title that is in the email subject.
What I mean to say in a nutshell is - when a user clicks on the link, he would get a new Outlook compose mail window with the same subject. Using simple mailto: with manually changing subject line wont help. Looking for some tips here - am open to look at dynamic options like VB code or something but it has to be via Outlook.
Include a placeholder in the signature's link (e.q. mailto:somebody#domain.demo?subject=xyzq), when Application.ItemSend event fires, look at the MailItem.HTMLBody property and replace the placeholder (xyzq above) with the value of the MailItem.Subject property. You might need to encode spaces and special characters.
The mailto: command doesn't allows to specify any custom information for Outlook. Read more about the mailto scheme in RFC2368.
If you are new to VBA, I'd recommend starting from the Getting Started with VBA in Outlook 2010 article which explains the basics.
I'm working on a Exchange Hub Transport Rule that applies signatures from variables that are pulled in from AD. Anyways I'm trying to get the email link working and I'm having an issue trying to escape quotes variable tags to include the proper format.
Variables included are %%Email%%, here is a link to all of them http://solarz.net/?p=31
Email:%%Email%%
The Email displays correctly but the link for the email address doesnt. Just cant figure out how to include the same %%Email%% for the link.
The Last %%Email%% displays correctly.
Thanks
Fixed it using some escape characters.
Email:%%Email%%
I am sending out email alerts with a static google map on them. Certain email clients are changing the content of the link so that it no longer works. Specifically, "&" is getting changed to & a m p ; (no spaces)
Google will not accept the link with the substitutions. I have also tried sending %26 in place of &, but google will not accept that. This is only happening on certain systems like AOL and maybe Hotmail.
Here's an example link:
http://maps.google.com/maps/api/staticmap?sensor=false¢er=36.124023600000,-115.170356400000&size=500x300&maptype=roadmap&markers=label:S%7Ccolor:red%7C36.114646000000,-115.172816000000&markers=label:H%7Ccolor:green%7C36.124023600000,-115.170356400000
Is there anyway to tell the email client NOT to change the link, or is there anyway to change the original link to work with Google and bypass the email client substitution?
TIA,
David
Your email program is probably telling the receiving programs what type of message it is. There is a header "Content-Type:" which is usually either "text/plain" or "text/html", with it defaulting to text/plain.
Probably what is happening is that your message is going out as text/html, and the receiving program is rendering as HTML, but first fixing things up so that ampersands get displayed as ampersands instead of as HTML directives. Otherwise, if I send a message that says "John & Carol are having a surprise party", the ampersand will screw things up or not get shown. (I forget right now which.)
It is also possible that your email program is doing the conversion before the message gets sent out and most of the receiving email programs are recognizing the issue and fixing it.
In order to tell exactly what is going on, send yourself one of these alerts and view the source. How you view the source varies depending upon which email program you use to read the message. With GMail, open the message, and in the upper right hand of the message, there is a drop-down "More"; choose "show original". Look for what the content type is and whether the ampersands in the URL are & or &.
Now, as to how to fix it, probably what you are doing right now is just typing the URL into the message. Instead, try making it a link. How you do this will vary depending upon which program you use to compose, but on GMail for example, there is a little symbol like a chain. Press that button and enter in the URL. That will generate HTML something like
<a href="http://mydomain.com/blah/blah?foo=1&bar=2&baz=3>http://mydomain.com/blah/blah?foo=1&bar=2&baz=3</a>
Thus, even if the ampersands get displayed as &, when the user clicks on the link, they will get the URL with proper ampersands.
I can't be certain this will work, as I don't know what email program you are using and thus how it does things. However, I think it is likely to work.
If it doesn't, you might be able to get it to work by sending as text/plain instead of text/html.
I recently learned that webmail clients like Gmail will do alterations on HTML emails, for example adding target="_blank" to <a> tags.
I've also discovered that other alterations happen as well. When I send an HTML email to Gmail (and possibly other web mail clients) from my PHP script, variable values included in the URL of any links are being stripped out. So, for example, this is the value I'm setting in my PHP code:
$mailContent = '<p><a target="_blank" href="https://example.com/confirmation.html?verification=x1x1x1x1x1x1x1x&email=yyyy#email.com">click here to go to the web site and activate your account!</a></p>';
But when the email is received in Gmail, the HTML code comes out like this:
<p><a target="_blank" href="https://example.com/confirmation.html?verification=&email=">click here to go to the web site and activate your account!</a></p>
The values x1x1x1x1x1x1x1x and yyyy#email.com have been stripped out from within the <a> tag.
How do I protect the values of the variables that I want to pass to the URL so that Gmail won't remove them?
Click View original/source on the message in Gmail to see if the URLs looks like they should then. If so you know that the problem is how Gmail is formatting the message for your viewing. If it's mutilated even in the source I was wondering if there's anything in your webpage/php/CMS (do you use one) that changes the code.
You should try URL-encoding as #Crisp said. Here's the W3 reference.
Emailing in html uses Quoted-printable Encoding. The problem with your $mailContent is that the "=" must be represented by =3D
Try adding this:
$mailContent = quoted_printable_encode($mailContent);
This may not be the perfect answer, but if your application allows for it, I have used URL shorteners a number of times.
http://goo.gl/ is my preferred because the API is super easy to implement and google is very fast. I have a function in a class and I just run my url through it and send the return wherever I need it to be.
Another non-perfect answer here but, my problem was that I was including an http url in the html body and apparently is not valid so I changed them to https. This was on a dev environment so no problem on production.
Here is more info about this:
Any URL's in the body of the mail which lead to insecure sites may also need to be removed. Use https://transparencyreport.google.com/safe-browsing/search to validate these links.. All links should be correctly prefixed with "https". https://en.wikipedia.org/wiki/HTTPS Google seem to be rejecting "http". Sometimes, but not always, removing links from any signature can help.
I'm trying to code an application which will allow users to send emails from outlook using the mailto tag. I know with the mailto, there involves limitation of # of characters that may be passed, as well as encoding.
Does anyone know the exact count of characters I can use, and what guidelines to follow when it comes to encoding special characters? What is counted in the max number of characters you can use? Body and Subject or the whole line including mailto syntax?
For example I will have the following:
<a href='mailto:test#gmail.com?subject=Test Mail&body=Line one.%0D%0ALine two.'>Test Link</a>
Would this be 69 characters??
Forgot to mention, supported browser will be IE6.
Any help would be appreciated.
Thanks
As far as I know there is no limit.
The HTML 4 spec says nothing about a limit
Authors may create links that do not lead to another document but
instead cause email to be sent to an email address. When the link is
activated, user agents should cause a mail program to open that
includes the destination email address in the "To:" field.
To cause email to be sent when a link is activated, specify a MAILTO
URL as the value of the href attribute.
http://www.w3.org/TR/WD-html40-970917/struct/links.html#h-13.2.2
However, many sites report a 256 character limit.
You should test to be sure.
You may also find this question and answers illuminating: What is the email subject length limit?
Same problem here, so far no good. IE9 has a limit of around 505 characters per href="...", Chrome 21 is better - around 2000 chars.
Update! According to this guys there is a workaround, and it seems to work for me:
ClientScript.RegisterStartupScript(this.GetType(), "mailto",
"<script type = 'text/javascript'>parent.location='" + longMailtoText +
"'</script>") ;
This will launch the script and open MailClient window as soon as client gets the response. LongMailToText should follow all standard rules, except for length - so far i was able to send over 2000 chars through it.