Urls with special characters are not converted correctly by SendGrid - special-characters

I have a url in one of my emails for twitter share that looks like:
http://twitter.com/share?text=Praneeta%27s%20test&url=http%3A%2F%2Fwww.mydomain.com%3Fparam1%3D303%26param2%3Dtest&related=praneeta&via=Praneeta
However SendGrid converts only the part before the ' (encoded as %27)
So the url I have in the emails sent is broken and looks like
http://email.mydomain.com/wf/click?upn=<long_encoded_key>%27s%27s%20test&url=http%3A%2F%2Fwww.mydomain.com%3Fparam1%3D303%26param2%3Dtest&related=praneeta&via=Praneeta
Is there a work around for this?
note: If I copy the email html and send it to myself via putsmail, it works fine, it breaks only when it goes via Sendgrid.

I just sent the link you posted through my own SendGrid account and it looks like it was properly encoded. I wonder if this was a temporary issue? What happens if you try sending that link again?

Just a heads up on this issue incase if people stumble on this. The method should be escape for example:
CGI::escape('\'')

Related

Send an email I want it isn't received

:)
I searched for any solution but I found nothing. I'd send an email like as follows:
To: Recipient1#domain.com CC: Recipient2#domain.com
but I'd want that Recipient1 does NOT receive the email, while Recipient2 does. In this way, Recipient2 thinks I sent the email also to Recipient1 but, actually, Recipient1 received nothing.
Is it possible?
Thank you very much.
Try adding special characters to the first email address, like a non breaking space, or a similar looking character from another character set, you may find a way to generate a failing address while not really displaying it!
I know it works that way with URL and some spam e-mails...

Links have random characters prepended in email

I am using the current link in my email.
*|baseUrl|*/verifyEmail?token=*|token|*
This however causes one or two people to get strange links from the email and get not found, usually based on some random email providers. E.g. - if I use a 10 minute mail (10minutemail.com), I get the following:
https://10minutemail.com/10MinuteMail/www.mywebsite.com/verifyEmail?token=b32fee82da59e7b4085269faca35ec7025122876
Correct link: www.mywebsite.com/verifyEmail?token=b32fee82da59e7b4085269faca35ec7025122876
Assuming this is due to baseUrl? Am I doing something fundamentally wrong when setting up my email link?
You need to include http:// or https:// with your baseUrl. Otherwise the email client may prepend a default base address instead of 'just' the missing protocol, especially if it is a webmail client.

Cannot pass url variable through Campaign Monitor Newsletter Email

I doing a newsletter where I need to pass 2 variables, token and email address to the URL to another website. The problem is that Campaign Monitor makes the URL it into the ShortURL which doesn't work in my situation.
This is how the URL should look like
http://www.example.com/newsletter/index.cfm?token=yes&email=[email]
This is how my Email Link Looks like
<a style="color:#263269;font-size:30px; font-weight:bold;text-decoration:none" href="http://www.example.com/newsletter/index.cfm?token=yes&email=[email]">YES</a>
Please advise me if theirs any alternative solutions for this issue. I cannot seem to find any solutions on the their official website.
Have you tried passing the values from the form and set action to get.
edit: try using ascii value of ampersand &AMP; (amp should be lowercase)
try removing the "&" and adding "&"

ColdFusion - Sending out a pretty email, mint style

I've used ColdFusion for sending text emails for years. I'm now interested in learning how to send those pretty emails you see from companies like Mint.
Anyone know of a good ColdFusion tutorial to teach me how to make this work and not get hit by bugs or spam filters?
As Ray said, ColdFusion supports HTML email, which is how you make an email "pretty". A quick down and dirty sample looks like this:
<cfmail from="bob#bob.com" to="someguy#email.com" subject="Check this out!" type="HTML">
<HTML>
<head><title>My Email</title>
</head>
<body>
<!--- Style Tag in the Body, not Head, for Email --->
<style type="text/css">
body { font-size: 14px; }
</style>
This is the text of my email.
</body>
</HTML>
</cfmail>
That's it, you've just sent an email. Notice how there is nothing preventing you from sticking in any old from email address you like? That leads me to my next point, in which you're wondering how to avoid getting hit by Spam filters:
The short answer is: You can't.
Oh sure, you can do intelligent things, like not including the word "VIAGRA" in your email (unless you're trying to send out penile enlargement emails and want to know how to get past spam filters, in which case I'm disinclined to help), but let's assume you just want to avoid obvious pitfalls.
I can think of two things that might help:
Send out email from a domain registered to the from email address. I didn't make the rules, but this one can be a pain. Ie., If you try to send out proxy emails for myorg.com, and your server does not host myorg.com, some spam filters are going to block it. What is usually done is to apply some branding to the from email, like this:
<cfmail from="MyOrg.Com <DONOTREPLY#registeredsite.com>" replyto="bob#myorg.com" to="someguy#email.com" subject="Test" type="HTML">
</cfmail>
In this case the email is sent from your server at registeredsite.com, with a replyto being the proxy email address. Spam filters will probably be okay with this, since the from email address of *#registeredsite.com resolves to your server. Try to send out with bob#myorg.com in the from, and you'll definitely run into some places that will block you.
Use a physical server, not a cloud site. I'm running into this very issue right now, but if you don't use a physical server that is located at a dedicated IP to send out your email, and if this server is not the originator of the email, some places are going to block it. This means no EC2 or Rackspace cloud site--sorry, some sysadmins are inclined to put down the banhammer on anything that originates from one of these providers, seeing as it is so easy to churn up your own little spam factory using EC2 or Rackspace for very little cost.
Even if you take these precautions, however, you'll run into a situation where someone gets a hold of your domain name and drags it through the mud. They'll send out thousands of emails to the internet in your name--or rather, in your domain's name--and because of the insecurity of email, your domain will get added to someone's blacklist after a thousand occurrences of hotlove4u#registeredsite.com hit the sysadmin's inbox. There's nothing you can do about it, either.
Or you can decide to run a cloud app and use a remote mail server. But some jokers will get one look at the originator being EC2 and will say, "Nope, sorry. Denied." They don't care about the legitimacy of your organization, only the origin of the email.
Email is an antiquated technology that has been rushed into mass usage before we really were able to think of a better protocol. As a protocol, it's terrible....and yet we're stuck with it, for backwards compatibility reasons. You cannot possibly avoid the spam filter. 95% of the email on the internet is junk mail, and never even reaches the intended recipient. Just absorb the enormity of that statistic for a moment, and pull your ideas back to reality. Many of the spam-prevention techniques being used today are unnecessarily aggressive, and create a great many 'false positives'. You can shoot for, say 80% of your email being sent, but what it really comes down to is this: As soon as the email has been fired off, it's completely out of your control. You can only take responsibility for so much.
What do you mean by "pretty" - HTML based? CF supports html email. Just use type="html". You can also use cfmailpart to send both text and html versions of the same content.
Here's a good article on making HTML email using CSS:
http://articles.sitepoint.com/article/code-html-email-newsletters
Ray's answer is right on the money about the CF part, but most of making this work is about HTML, CSS and testing testing testing.
And I would add to this all that you can check whether a mail will be displayed correctly and whether it will get hit by a spamfilter or not by going to a website that is called litmusapp. You can send your test newsletter to one of their emailaddresses and then they will give you screenshots of how each newsletter will look like in each type of emailclient. Also it checks the newsletter against a few popular spamblockers and gives you advice on what to change.
I would start by finding an HTML template email that you like. Then you put it in the tags with the type set to html as mentioned above. You might want to consider doing the multipart email to handle plaintext (and blackberry) users.
I subscribe to the Campaign Monitor Newsletter & they also have a list of very useful articles here: http://www.campaignmonitor.com/resources/
Might want to check out this ebook from MailChimp. Email apps render HTML in some unusual ways, so be prepared to use tables for layout.
Remember when you try to change the color of the font or background when you writing a cfmail, before you add #F0000, you need to ad extra # at the front of it, like ##F0000. Otherwise, it will cause an error.

mailto with empty recipient?

is there anyway that I can use "mailto" with empty recipient? I only want to supply the subject and the message body and then the user can write the to addresses on mail. I tried writing only a space but it didn't work.
This should do, I tested it.
mailto:?subject=your%20subject&body=your%20body
And as HTML with correct escaping of the ampersand:
test
This should work..
test
I tried the accepted answer but it failed to launch an email when using Chrome. Using a %20 instead of a space worked though:
Send an Email