Technical details
Working with delivermail is really simple. You can add a subscribe form to your website by following the next five steps.
Do you want to build an unsubscribe field?
Step 1: Create a form
Create a form like you are used to make it.
<form action="" method="post" accept-charset="utf-8">
<!-- form fields -->
<p><input type="submit" name="subscribe" value="Subscribe" /></p>
</form>
Step 2: Change form action
Change the form action to http://subscribe.delivermail.be.
<form action="http://subscribe.delivermail.be" method="post">
<!-- form fields -->
<p><input type="submit" name="subscribe" value="Subscribe" /></p>
</form>
Step 3: Add your delivermail list key
Add an hidden input field named dm-key to your form, the value of this field is the list key you received from us.
<form action="http://subscribe.delivermail.be" method="post">
<input type="hidden" name="dm-key" value="9bbb03a96655bc91b01ffdsdsf52ba7d" />
<!-- form fields -->
<p><input type="submit" name="subscribe" value="Subscribe" /></p>
</form>
Step 4: Add the other fields
Add name (dm-field-name) and email (dm-field-email) fields to your form.
Extra fields can be added on the same way, we add -as example- a phone number field (dm-field-phone).
<form action="http://subscribe.delivermail.be" method="post">
<input type="hidden" name="dm-key" value="9bbb03a96655bc91b01ffdsdsf52ba7d" />
<p>
<label for="dm-field-name">Name:</label><br />
<input type="text" name="dm-field-name" />
</p>
<p>
<label for="dm-field-email">Email:</label><br />
<input type="text" name="dm-field-email" />
</p>
<p>
<label for="dm-field-phone">Phone:</label><br />
<input type="text" name="dm-field-phone" />
</p>
<p><input type="submit" name="subscribe" value="Subscribe" /></p>
</form>
Step 5: Set result pages
You can redirect your users to a custom page after they subscribed.
This can be done by adding a dm-option-success and/or a dm-option-errors field to your form.
Note:
We use standard thank you and error
pages if you don't set the dm-option-success and dm-option-errors fields.
<form action="http://subscribe.delivermail.be" method="post">
<input type="hidden" name="dm-key" value="9bbb03a96655bc91b01ffdsdsf52ba7d" />
<input type="hidden" name="dm-option-success" value="http://www.madewithlove.be/newsletter/thanks" />
<input type="hidden" name="dm-option-errors" value="http://www.madewithlove.be/newsletter/oops" />
<p>
<label for="dm-field-name">Name:</label><br />
<input type="text" name="dm-field-name" />
</p>
<p>
<label for="dm-field-email">Email:</label><br />
<input type="text" name="dm-field-email" />
</p>
<p>
<label for="dm-field-phone">Phone:</label><br />
<input type="text" name="dm-field-phone" />
</p>
<p><input type="submit" name="subscribe" value="Subscribe" /></p>
</form>
And the unsubscribe field?
Making the unsubscribe form is a piece of cake when you already made the subscribe form.
You only need to change the form action to http://unsubscribe.delivermail.be
and remove the all the inputs fields starting their name with dm-field-
except for the dm-field-email field.
Note:
You can still use the dm-option-success and dm-option-errors fields to send your users to custom result pages.
<form action="http://unsubscribe.delivermail.be" method="post">
<input type="hidden" name="dm-key" value="9bbb03a96655bc91b01ffdsdsf52ba7d" />
<p>
<label for="dm-field-email">Email:</label><br />
<input type="text" name="dm-field-email" />
</p>
<p><input type="submit" name="subscribe" value="Subscribe" /></p>
</form>
Delivermail is a madewithlove product. All rights reserved.
Copyright © 2008 madewithlove