SOLVED: Unsubscribe Link in plain text email

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
johnd123
Forum Newbie
Posts: 5
Joined: Thu Dec 20, 2007 6:47 pm

SOLVED: Unsubscribe Link in plain text email

Post by johnd123 »

Hi all

Any help or advise on this would be great :D

Im currently designing a mailing script which sends mutipart emails and attachments.

My problem is kinda strange, I dont think the problem may even be a php issue, it could be the email clients.

Ok, each email sent has a dynamic unsubscribe link added..

for example: http://www.domain.com/index.php?action=remove&id={email address here}

when the link is clicked an unsubscribe form is displayed with the email in the text field ready to go.

The problem: When viewing the plain text version, the link gets changed causing the link to fail when clicked.

in the above example the link would get changed to action=move - so the re part goes missing :crazy:

also in some cases the = equals sign get replaced with another symbol

The link is fine in the html version, its only the plain text version im having these probs.

I have viewed the txt email in outlook and a program called mailwasher and they both distort the unsubscribe url in some way.

I have tried using different actions (action=unsub / action=unsubscribe / action=optout) but the link gets messed up somewhere :cry:

Hope someone can help

cheers :drunk:
Last edited by johnd123 on Sat May 30, 2009 9:03 pm, edited 2 times in total.
johnd123
Forum Newbie
Posts: 5
Joined: Thu Dec 20, 2007 6:47 pm

Re: PROBLEM/SOLVED: Unsubscribe Link in plain text email

Post by johnd123 »

ok dont mean to answer my own post but after some deep digging into my code i noticed something in the mails plain text mime boundary.

For those who want to know what was causing me this problem, it was this line of code:

Content-Transfer-Encoding: quoted-printable

No idea why it was there or what the hell it is but it caused many problems with dynamic links in the plain text part of the email.

Hope this will help anyone suffering the same fate :D
Post Reply