Page 1 of 1

SOLVED: Unsubscribe Link in plain text email

Posted: Sat May 30, 2009 6:25 pm
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:

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

Posted: Sat May 30, 2009 9:00 pm
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