# Unsubscribe Plugin

A simple plugin that adds email addresses from a form into the emails_blocked table.  This is used together with the 'NewsletterSignUp' plugin or 'Ezine' module and relies on them being installed beforehand so you have access to the "emails_blocked" table to add email addresses into.

# Installation
Clone the repository into `~/public_html/plugins/Unsubscribe/`:

```bash
git clone https://YOUR_BITBUCKET_ACCOUNT@bitbucket.org/mtcmedia/core-plugins-unsubscribe.git ~/public_html/plugins/Unsubscribe/
```

To stop this interfering with your project VCS tracking run this command to delete the git repository created by git clone -

```bash
rm -rf ~/public_html/plugins/Unsubscribe/.git
```

You need to add this line into the .htaccess file to allow the simple /unsubscribe address to work.

```bash
RewriteRule ^unsubscribe.* /plugins/Unsubscribe/email_unsubscribe.php [QSA,L]
```
There is a possibility that for older core (pre-core) versions You would need:
```bash
RewriteRule ^email.unsubscribe.* /plugins/Unsubscribe/email_unsubscribe.php [QSA,L]
```