Other subscription methods

The easiest way to let users subscribe to your newsletters is to activate the default AcyMailing subscription form (WP Widget or Joomla module), but in some cases you may need other solutions.

Link in an email
Subscription via URL
External subscription form

Subscribe link in an email

You can easily insert a direct subscribe link in your emails with the dynamic text feature. Insert a text zone, click on it then click the {;} button:

A popup will show up. Under the tab "Subscription", click the "Insert a subscribe link" option, select the lists you want the user to be subscribed to when clicking the link, then click the "Insert" button.

You can modify the text of the link with the "Text" option, "Subscribe" is written by default.

Subscription via URL

If you want to use a direct subscription link somewhere on your site, or even another site, you can use this link:

Joomla websites

https://www.yoursite.com/index.php?option=com_acym&ctrl=frontusers&task=subscribe&hiddenlists=1,3&user[email]=email@example.com

WordPress websites

https://www.yoursite.com/wp-admin/admin-ajax.php?page=acymailing_front&ctrl=frontusers&task=subscribe&hiddenlists=1,3&user[email]=email@example.com&action=acymailing_frontrouter&noheader=1

In these links, you have to replace "1,3" by the IDs of the lists (you can see them on the AcyMailing contact lists' listing page on the right). email@example.com has to be replaced by the email address of the user.

External subscription form

Sometimes you need to create a form on another website. If this is your case, you can use the following code:

Joomla websites

<form action="https://YOURWEBSITE/index.php" method="post">
<table class="acymailing_form">
<tr>
<td><label for="user_name">Name</label></td>
<td><input id="user_name" type="text" name="user[name]" value="" /></td>
</tr>
<tr>
<td><label for="user_email">E-mail</label></td>
<td><input id="user_email" type="text" name="user[email]" value="" /></td>
</tr>
<tr>
<td colspan="2"><input class="button" type="submit" value="Subscribe" name="Submit" /></td>
</tr>
</table>
<input type="hidden" name="ctrl" value="frontusers" />
<input type="hidden" name="task" value="subscribe" />
<input type="hidden" name="redirect" value="https://YOUR_REDIRECT_URL" />
<input type="hidden" name="hiddenlists" value="YOUR_LISTS" />
<input type="hidden" name="option" value="com_acym" />
</form>

WordPress websites

<form action="https://YOURWEBSITE/wp-admin/admin-ajax.php" method="post">
<table class="acymailing_form">
<tr>
<td><label for="user_name">Name</label></td>
<td><input id="user_name" type="text" name="user[name]" value="" /></td>
</tr>
<tr>
<td><label for="user_email">E-mail</label></td>
<td><input id="user_email" type="text" name="user[email]" value="" /></td>
</tr>
<tr>
<td colspan="2"><input class="button" type="submit" value="Subscribe" name="Submit" /></td>
</tr>
</table>
<input type="hidden" name="ctrl" value="frontusers" />
<input type="hidden" name="task" value="subscribe" />
<input type="hidden" name="redirect" value="https://YOUR_REDIRECT_URL" />
<input type="hidden" name="hiddenlists" value="YOUR_LISTS" />
<input type="hidden" name="page" value="acymailing_front" />
<input type="hidden" name="action" value="acymailing_frontrouter" />
<input type="hidden" name="noheader" value="1" />
</form>

In both cases, don't forget to replace the following strings:

  • YOURWEBSITE: by the website on which AcyMailing is installed, it will collect the form's data

  • YOUR_LISTS: by the IDs of the lists separated by a coma. The user won't see these lists.

  • YOUR_REDIRECT_URL: this input is actually optional, you can specify any URL here

Add custom fields

Custom fields can be added the same way the "name" and "email" fields are displayed, by using their "namekey" identifier (in the database table "xxx_acym_field"):

<tr>
<td><label for="user_field">My field</label></td>
<td><input id="user_field" type="text" name="user[field]" value="" /></td>
</tr>

Display the lists

You can let the users choose their lists by adding inputs like this:

<input type="checkbox" name="subscription[]" value="3"/>My List with ID 3<br/>
<input type="checkbox" name="subscription[]" value="7"/>My List with ID 7<br/>
<input type="checkbox" name="subscription[]" value="14"/>My List with ID 14<br/>

The captcha blocks the form

If you activated the captcha in the AcyMailing configuration page, tab "Security", you will need to add the following input in your form with the "Security key" value of the same page:

<input type="hidden" name="seckey" value="SECURITY_KEY_VALUE" />