I
I
il2772015-08-27 22:33:45
PHP
il277, 2015-08-27 22:33:45

"Unsubscribe" button in the letter, how to do it?

I want to do an e-mail newsletter. Where is the unsubscribe button? how to do it? How do I know that one of the recipients unsubscribed. thank.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
K
Ken Jee, 2015-08-27
@Machez

1) Для каждого адреса генерируем токен и пишем его например в таблицу базы данных
2) В письмо на кнопку Отписаться ставим ссылку вида site.ru/unsubscribe?token=сенерированный_токен
3) При переходе по ссылке - проверяем наличие токена в таблице и отписываем соотвествующий e-mail

N
Night, 2015-08-27
@maxtm

Make a link to your site, such as
www.xxx.ru/unsubscribe/[email protected]&token=[token]
Generate a token based on email, or for this email

S
Stas Parshin, 2015-08-28
@stasparshin

Use a mailing service. For example, Mailchimp or SendPulse

G
Gluck Virtualen, 2015-08-29
@gluck59

Just draw a left link that leads nowhere. No one is following this and everyone has scored.

D
Dmitry Kartashov, 2015-12-05
@Kartashoff

You need this (rfc2369) document. In the header of the letter you need to enter List-Unsubscribe

List-Unsubscribe

   The List-Unsubscribe field describes the command (preferably using
   mail) to directly unsubscribe the user (removing them from the list).

   Examples:

     List-Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
     List-Unsubscribe: (Use this command to get off the list)
         <mailto:[email protected]?body=unsubscribe%20list>
     List-Unsubscribe: <mailto:[email protected]>

     List-Unsubscribe: <http://www.host.com/list.cgi?cmd=unsub&lst=list>,
         <mailto:[email protected]?subject=unsubscribe>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question