Hyperlinks are being overwritten in emails - zend-framework

I am sending out emails from my website using Zend_Mail and Send Grid. I have hyperlinks in the email that are being overwritten with what appears to be garbage by the time it gets to the user's inbox.
For example,
href="http://www.foo.com" is becoming href="http://email.foo.com/wf/click?upn=DSDRHSSBH2938TS".
I do not have this problem when I remove the 'http://' from the href. This is not a solution for me however, because links without 'http://' do not work in some email clients.
I checked the Zend Mail content and the links appear to be fine, so I am wondering if this is a problem with Send Grid or the email client. I have looked all over the web and have found very little information on this. I have seen some people with similar issues, but no one has been able to provide a real solution.
Has anyone seen anything like this? I'll be happy to provide more information if needed.

It looks like Send Grid is re-writing the URLs for click tracking. Try disabling this feature in your Send Grid account. https://sendgrid.com/docs/Apps/click_tracking.html

Related

https link showing in outlook where preview should be

One of my customers mentioned to me that the way they have out look set up, allows them to see a short email preview in the form
hello#email.com
Hi, this is a message preview
However when I email, the get a big long https string and at first they thought that the email might include a virus so were dubious about opening it.
I am keen to find a way to stop this happening.
My email displays as
me#email.com
<https://z86orge6w04.....>
I use Thunderbird to send my emails, I shouldnt think that my email client would cause this though.
Also I use an smtp relay mailersend and their details are included in the https link as you will see from the pic.
I have also used socket labs and when I send using their relay, the link is still there but changes slightly
So I think that it may be something to do with the fact I use an SMTP relay
I have noticed though that it only seems to be outlook that shows this, Gmail, thunderbird and others that I have sent testemails to do not display in this manner.
At first I thought that it was because my logo in the header contained a link to the website but I have removed the link and there is no change
The part at the top circled in yellow is what they see when I email, the bit below circled in red is what they see from everyone else
The problem is not related with Thunderbird but with MailerSend which is a transactional email service.
According to mailchimp:
Transactional emails are automated emails sent from one sender to one recipient, usually related to account activity or a commercial transaction.
The URL shown in the Outlook preview is a tracking URL. You can solve this problem by removing tracking or by asking support to MailerSend.

Cant we use javaascript and jquery while preparing page that goes as email

I am developing a page, which will be sent to people as email. Just like advertisement emails which we usually get. I wanted to know that it will support only html-php or can we use javascript and jquery also in that. Thank You for help!
Generally no you cant use javascript in an email body, but it will depend on the email client used to view the email as to whether it's allowed or not. It'd bad practise generally, and if you do this the majority of your mails will not get to their destination. Also bear in mind the HTML and CSS supported by email clients is limited, so don't expect a page that works in your web browser to look the same on an email client.
You can of course use javascript to help render the body of the message, and then extract the HTML/CSS that's been generated, but don't include any of the javascript code itself in the body that gets sent.
This looks like a duplicate of Is JavaScript supported in an email message?...
As Russell says, email clients generally do not support scripting. Maybe one or two do, but the coverage will be very low.
what i want is the countdown timer which will be displaying in the
user email.
But... if what you're interested in is a countdown, you can do that in most email clients. If you have a webserver with PHP, here is a tutorial on how to do this. This won't work in Outlook 2007/10/13, but the coverage is pretty good considering it's interactive inside an email.
There are also online tools to accomplish a countdown timer, though I can't personally vouch for those.

when I used an anchor tag in email body it's going to spam folder

Actually I am facing a lot of problem about email sending. When I am trying to send a email using a module named phpmailer that contains an anchor tag or hyperlink as like
click here
email go to the spam folder but when i remove this anchor tag or remove the link from the body of the email its send properly and goes to inbox.
i do not get what was the problem.
i am using a shared hosting with cpanel.
please anybody help me.
For all links? Or just links to a particular site?
You might want to check that the site you're linking to isn't listed in SURBL or similar blacklist.
It's also worth inspecting headers on received messages - spam filters will often add headers telling you why it classified a message as spam.
Generally there is nothing specific you can do - if there was an obvious way to avoid spam filters then spam senders would use it and the filters would be useless. That said, almost every receiver uses entirely different spam filtering, so your results may vary enormously anyway.

Email questionnaire with checkboxes/radio buttons?

I know I could simply make a html form on a website and email a link to it, or send the html as an email which posts to the website and try to deal with the errors/warnings for different peoples mail clients.
But, due to a specific request from a client, I am wondering if there is a way I could send an email, a questionnaire, with the same checkbox elements which then user receiving the questionnaire simply checks and sends back as a reply to the sender?
This is not very well supported across email clients, and will even throw some scary looking error messages to your recipients. You will be much better served linking to a landing page.
More info: http://www.campaignmonitor.com/resources/will-it-work/forms/
Email only supports html and css. I think Google has something like that, but it is not widely supported.
Generally, neither html of css can submit a form or (if the form even displays) acknowledge which form fields are populated/checked. Pretty much all you have is hyperlinks.
Passing parameters in your hyperlink would allow you to pre populate a form, but that is about as tricky as you can get.
Something like this:
Register Now
You could then use PHP for example to populate the landing page form with the values. I know it doesn't help much for a questionnaire, but that's all we have to work with in email.

Email notifications sent by Drupal have broken links sometimes

I'm using the Subscriptions module of Drupal to send out subscribed emails on a regular basis and I've noticed that the links embedded in the email will break if the link is too long, but only for some users. The email client that user is using is Entourage. The crazy thing is that I use Entourage, also, but I don't have that problem with the links in my subscription emails that are sent to me. Here's what's happening:
http:samplelinkhere?var=blahblah
blahblah
The top line of the link will be underlined and part of the link, but the bottom part will not be underlined (even though it should be) and so, the link is broken. Does anyone know how to fix this issue?
AFAIK, there is not much you can do about this. As long as the links do not contain line breaks in the original mails sent by your server, it is up to the receivers mail client to add line breaks for readability, usually based on some user preference settings (Which could explain the difference to your own Entourage client).
Also, some clients try to detect links and avoid breaking them, others don't, and some even have plugins for this.
A possible workaround would be sending HTML mails instead, but that opens a huge different can of worms concerning mail client compatibility, so I do not recommend it.