Click here to Skip to main content
15,891,828 members
Please Sign up or sign in to vote.
1.44/5 (2 votes)
See more:
I am doing email marketing and I want to add an unsubscribe link at the bottom of my email.
There is no email ID and I want to send the recipient's EMAIL ADDRESS to my unsubscribe php page as a variable.
Could you please help me?

What I have tried:

Some suggestions found on the web but it doesn't work for me!
Posted
Updated 23-Jan-18 5:47am
Comments
David_Wimbley 18-Jan-18 23:11pm    
What have you tried? Where are you stuck? How do you expect us to help you when we don't have access to your computer or PC.

If you haven't tried anything...i suggest you try something.

If its passing an email address to the html template that is being emailed to each person and making it where the unsunscribe link calls a URL with your email address attached (ex: http://yoursite.com/ubsubscribe/myemail@email.com)...how you do it is up to you since we know nothing about your project nor do we have access to any of your code.
Member 13631263 23-Jan-18 14:29pm    
My problem is, I need to capture the recipient’s email from within the email message he got from me and then pass that email address to my unsubscription page.
I don’t have any email ID to capture it from that message so please tell me how could I do something like this?
David_Wimbley 23-Jan-18 14:36pm    
If you don't know the recipients email how are you sending them emails in the first place so they can unsubscribe?
ZurdoDev 19-Jan-18 7:30am    
It is very easy to do so what do you want from us? Create a page that you can link to and pass in the information you need. Where are you stuck?
Member 13631263 23-Jan-18 14:30pm    
My problem is, I need to capture the recipient’s email from within the email message he got from me and then pass that email address to my unsubscription page.
I don’t have any email ID to capture it from that message so please tell me how could I do something like this?

1 solution

You can create a link like the following:

www.yoursite.com/unsubscribe.php?e=youremail@gmail.com


in your php script get email:

$email='';
if (array_key_exists('e', $_GET)) {
   $email = $_GET['e'];
}
 
Share this answer
 
Comments
Member 13631263 23-Jan-18 14:29pm    
My problem is, I need to capture the recipient’s email from within the email message he got from me and then pass that email address to my unsubscription page.
I don’t have any email ID to capture it from that message so please tell me how could I do something like this?
Sergiy Tytarenko 23-Jan-18 14:41pm    
Should you know recipient's email when you send a message to them?

You unsubscribe page should be a simple form, that you prefill with a passed parameter or leave empty if no parameter passed, so the user can provide their email. Only once the form is submitted, you process an actual unsubscribe.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900