Place unSubscribe button on an email

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
trags3
Posts: 418
Joined: Wed Apr 09, 2014 1:58 am
Location: Las Vegas, NV

Place unSubscribe button on an email

Post by trags3 » Fri Feb 03, 2023 8:01 pm

I am in the process of writing an app that will send several emails at a time.
I need to have an unsubscribe button on the email so recipients can easily opt out.
I can handle the incoming email to the sender(I think) but just don't know what needs to be behind the unsubscribe button on the email.

Tom

Klaus
Posts: 13828
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Place unSubscribe button on an email

Post by Klaus » Fri Feb 03, 2023 8:50 pm

trags3 wrote:
Fri Feb 03, 2023 8:01 pm
... but just don't know what needs to be behind the unsubscribe button on the email.
Well, that is just a link to a serverscript which does the unsubscribe action.
Is that what you mean?

trags3
Posts: 418
Joined: Wed Apr 09, 2014 1:58 am
Location: Las Vegas, NV

Re: Place unSubscribe button on an email

Post by trags3 » Fri Feb 03, 2023 10:09 pm

I don't think it is the same,
I assume that when you get an email from a mail list and they have the unsubscribe option that an email is sent to the original sender.
I don't know that this is the case but that's what I have assumed.
In my case I don't expect the email list to be on a server but on a Windows Computer..
Tom

SparkOut
Posts: 2852
Joined: Sun Sep 23, 2007 4:58 pm

Re: Place unSubscribe button on an email

Post by SparkOut » Fri Feb 03, 2023 11:05 pm

It all depends on the setup of the mailing-list and what you deliver, as well as what you record and where it is recorded. Presumably you have some sort of database with subscribers' details - on a server somewhere? How did you get the sign-up information and what did you do with it?
Disregard what you assume happens. Now, what do you want to happen?

(Also are you handling user data in a GDPR compliant manner?)

trags3
Posts: 418
Joined: Wed Apr 09, 2014 1:58 am
Location: Las Vegas, NV

Re: Place unSubscribe button on an email

Post by trags3 » Fri Feb 03, 2023 11:58 pm

Here is what I want to happen.
A database of names, email addresses and other information is stored on my computer. Some or all of these people may not know me or what I do.
When I send out a mass email to all of these addresses through an App I am developing, I want them to have the option to click on a field in the email I send them to notify me that they wish to be removed from my list. I don't want to burden them with having to contact me any other way.
When that email is received by me I can delete them from my database as well as keep a record so I don't add them in the future unless they tell me they want me back.

Tom

PBH
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 129
Joined: Sun Feb 20, 2011 4:26 pm
Location: Vancouver Island, BC, Canada. ex.UK
Contact:

Re: Place unSubscribe button on an email

Post by PBH » Sat Feb 04, 2023 5:15 am

I don’t see this as a LiveCode problem, (afaik) you can’t just add a LC button to an email message even if the email is generated using LC, however, you can add a formatted link in most email apps, the following should work if you can embed it…

Code: Select all

 mailto:you@youremail.com?subject=Unsubscribe%20=Please%20unsubscribe%20me.
I can’t think how this relates to a LC generated email, we have no power right now so I’m just browsing on my iPad and can’t test, but a better option may be to generate an html formatted email with the following code…

Code: Select all

 <a href="mailto:you@youremail.com?subject=Unsubscribe%20&body=Please%20unsubscribe%20me.">Unsubscribe</a>
Either way, this will open their default email app with a pre-populated email message ready for them just to hit the ”Send” button. You will probably need to remove them from your email list manually unless you write an app to receive the unsubscribe email message, that’s definitely possible, I did that many years ago, albeit in FileMaker. You can’t force their system to send you an email any other way (not legally anyway), other than opening their email app and pre-populating the message.

I don’t think I’ve ever seen an email with an embedded unsubscribe button, but that‘s not to say it’s not possible, I’m sure it could be done with a graphic linked to something like the above, or maybe a server side script.

Probably much easier to use a service like Mailchimp, but I also understand the desire to keep it in-house, generally much more satisfying and more controllable.

So many ways to skin a cat! 😏

Good luck.

Paul

Code courtesy of… https://mailtolinkgenerator.com/

trags3
Posts: 418
Joined: Wed Apr 09, 2014 1:58 am
Location: Las Vegas, NV

Re: Place unSubscribe button on an email

Post by trags3 » Sat Feb 04, 2023 5:07 pm

Thanks Paul
This is exactly what I needed. I generate the email within the app, so I should be able to include your unsubscribe script in the email.
Thanks again!
Tom

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”