Table of Contents
Subscribe.aspx
This function is contained in predefined subscription forms: it allows users to sign up to a newsletter using a You can use subscribe.aspx as the form handler from a form hosted on your Web site. It allows you to offer your Web site visitors a way to sign up for your newsletter(s), while giving you full control on the look & feel of the signup form. By default the signup process uses the double opt-in method (confirmed opt-in).
Form The signup form must be structured as follows, while “name” attributes can be drawn from the page Settings > Codes table in the MailUp console. Please note that any “type” can be set for all parameters, as it is arbitrary.
Subscription form action:described below:
- the field “name” attribute for each field must match the corresponding code that can be located under Settings > Codes Table in your MailUp admin console
- the field "type" is entirely up to you
Codes Table
Info | ||
---|---|---|
| ||
The field code uses the word "CAMPO" because MailUp's original source code was developed in Italy. "Campo" means "Field" in Italian |
Subscription form action
Code Block | ||
---|---|---|
| ||
<form method="post" action="http://esempioxyzw.emailspespsrv.netcom/frontend/subscribe.aspx"> |
...
The URL to put in the action of the form tag depends on your MailUp account's unique URL. If your MailUp admin console address is xyzw.espsrv.com, the correct action
...
URL for the form (the URL of the form handler) will be http://xyzw.espsrv.com/frontend/subscribe.aspx.
...
The parameters for calling subscribe.aspx
...
are described below.
Email field (
...
required)
The form must contain a field named "email". The forms that you can create in your MailUp admin console under Settings > Signup Form contain some basic JavaScript validation to validate that a correct email address has been provided. Feel free to use that JavaScript code.
Code Block | ||
---|---|---|
| ||
<input name="email" type="text" size="60" maxlength="100"> |
...
> |
List field(s) (required)
You must specify which list(s) the subscriber is being subscribed to. You can include more than one list, but at least one must be specified. If it's only one list, you can include it as a hidden field.
Code Block | ||
---|---|---|
| ||
<input type="hidden" name="list" value="1"> |
If you wish to let the user choose more than one list , it is possible to list them using the same name every time, for example(e.g. "New product announcements" and "Special offers"), you can do so by presenting them using check boxes. For example, assuming that...
- "New product announcement" is List #2 in your MailUp account
- "Special offers" is List #3 in your MailUp account
Code Block | ||
---|---|---|
| ||
<input name="list" type="checkbox" value="2">Seconda>New listaproduct <br> announcements<br> <input name="list" type="checkbox" value="3">Terza lista <br> |
...
>Special offers<br> |
If you wish to subscribe a user to more than a list, without him choosing one of letting them pick, you can use the following format:
Code Block | ||
---|---|---|
| ||
<input type="hidden" name="list" value="1,2,3"> |
...
Info | ||
---|---|---|
| ||
In case a user subscribes to more than |
...
one list, the system will still only send |
...
one confirmation |
...
request message, which will |
...
allow the user to confirm their subscription to all the lists |
...
included in the signup request. Note that the system will use the |
...
message templates (e.g. subscription confirmation request message and subscription confirmation message), as well as the Web page templates defined for the first List that the user was subscribed to. |
subscribes to; list ID can be found at the page will be subscribed to. You can see that numeric value shown in the MailUp admin console under Settings > Edit lists or looking at the dropdown menu at the top left of the page. In the image below, the list called "Business" has value=3.
Dropdown menu for list selection
...
Mobile phone number (optional)
...
You can use the mobile number field to record the customer's mobile number in the following fields must be added to the form:database and be able to send text messages to them.
Code Block | ||
---|---|---|
| ||
<input id="prefix" value="0039001" type="text" name="prefix" /> <input id="sms" type="text" name="number" /> |
...
Please note that the field “prefix” “prefix” (international prefix) needs not be entered as a separate field, it can also be inserted in the field “number”. Anyway we suggest that it should be kept separated We recommend passing it as a separate field for clarity’s sake.
Groups (optional)
...
You can optionally present the user with a choice of one or more groups.
Code Block | ||
---|---|---|
| ||
<input name="group" type="checkbox" value="1"> First group <br> <input name="group" type="checkbox" value="2"> Second group <br> |
...
If you want the user to be subscribed to different one or more groups, without presenting a choice, simply set the type must be as “hidden”, as in the example given below:
Code Block | ||
---|---|---|
| ||
<input name="group" type="hidden" value="2,8,10"> |
This wayIn the example above, the user is automatically subscribed to groups 2, 8 and 10. The Group IDs are listed at the page in your MailUp admin console under Settings > Codes tablein the MailUp console.
Personal
Other personal data fields (optional)
...
You can ask your users or customers to provide any other piece of information that will be saved in the Personal Data Fields that have been setup under Manage > Personal Data Fields.
Code Block | ||
---|---|---|
| ||
<input name="campo1" type="text" size="60" maxlength="100"> First Name <input name="campo2" type="text" size="60" maxlength="100"> Last Surname |
In the form it is the customer’s responsibility to freely set fields, dropdown menus, colors, styles, checkboxes, controls. The fields which are not necessary can be removed from the registration form. Standard MailUp nomenclature “campo1”, “campo2”,… “campoN” must be used. If there are extra fields with names which are not recognized, they will be ignored.
...
Name |
The field type is entirely up to you. See the section above for details about the Codes Table.
Modifying the sender email and name
You can choose to submit as part of the customer registration the following values to override the default ones for the List.
Code Block | ||
---|---|---|
| ||
<input type="hidden" name="dynsndmail" value="email@example.com" > <input type="hidden" name="dynsndname" value="Name Surname"> |
It is possible to specify the fields above in case you should want to replace the default values for the list.
These fields allow This allows to send a subscription confirmation message with a personalized sender, and, in case . When both have been specified, they will be set as key the values in the “From” field, while the default name and email address for the MailUp list will be used for the “Sender” field. So, on many clients this message will be viewed as “sent by Sender on behalf of From”. A confirmation email like this contains a link to the newsletter management system to complete the subscription, while, if the recipient replies to the email message (“Reply to”), the reply will be sent to the address indicated in the “From” field. This practice is very useful when a confirmation email is sent to an acquaintance: the invitation is much more effective if the person who invites is among the senders of the email (in the “From” field).
Anyway, filling up these fields is optional: in case neither of them has been specified the confirmation request email will be sent using the default list values to fill the “From” field.
Xmlsubscribe.aspx (User subscription)
This function is similar to the previous one, : the main differences lie is in the format with which the parameters are defined, and in the fact that "xmlSubscribe" returns an output code with information about the outcome of the operation.
If If you wish to create a form that subscribes the user to more than one list at the same time, and sends only one confirmation email, use the "subscribe.aspx" API described above.
URL: http://newsletter.domainname.tld
URL
The URL to use depends on your MailUp account's unique URL. If your MailUp admin console address is xyzw.espsrv.com, the correct action URL for the form (the URL of the form handler) will be http://xyzw.espsrv.com/frontend/xmlSubscribe.aspx (replace the part marked in red with the actual third level domain)
PARAMETERS AT ENTRANCE:
REQUEST PARAMETERS
Name | Mandatory? | Description |
N (1) | User email address | |
Sms | N (1) | User mobile number, with international prefix (2) |
List | Y | List ID |
Group | N | Groups to which to subscribe the user |
Confirm | N | Parameter to enable or disable confirmation request email. Accepted values: 0/1. Default value: 1 |
csvFldNames | N | Personal data codes (separated by the ";" character) |
csvFldValues | N | Values related to personal data codes (separated by the ";" character) |
retCode | N | Parameter to enable or disable the return of an output code for the call. Accepted values: 0/1 – Default value: 0 |
Dynsndmail(3) | N | "dynamic sender e-mail address" Sender address in the confirmation request email (If blank, default value for the list will be used) |
dynsndname(3) | N | "dynamic sender name" Sender name in the confirmation request email (If blank, default value for the list will be used) |
(1) either email or sms parameter must be specified
(2) if blank, default value for the list will be used
(3) for further details on how to use these fields, please see the section about the "subscribe.aspx" API (top of this page)RETURNED
RESPONSE VALUES
...
CODE | DESCRIPTION |
0 | Operation completed successfully / User already subscribed |
1 | Generic error |
2 | Invalid email address or mobile number |
Note: to know your console's third level domain name, just open MailUp and look at the console address. In the image below it is "a1e6g.s11.it"
...
Xmlchksubscriber.aspx (User subscription check)
This function performs a check on a user subscription status URL: http
URL
The URL to use depends on your MailUp account's unique URL. If your MailUp admin console address is xyzw.espsrv.com, the correct action URL for the form (the URL of the form handler) will be http://newsletterxyzw.domainnameespsrv.tldcom/frontend/xmlChkSubscriberXmlchksubscriber.aspx
REQUEST PARAMETERS
...
Name | Mandatory? | Description |
ListGuid | Y | Alphanumeric code associated to a distribution list |
List | Y | List ID |
N (1) | User email address | |
Sms | N (1) | User mobile number, with international prefix (2) |
(1) either email or sms parameter must be specified
(2) if blank, international code for Italy will be used (0039)
RETURNED
RESPONSE VALUES
...
CODE | DESCRIPTION |
1 | Generic error / user not subscribed |
2 | User subscribed (OPT-IN) |
3 | User unsubscribed (OPT-OUT) |
4 | User subscription to be confirmed (PENDING) |
Info |
---|
NOTE: |
...
Code 1 is given as output value both in case of error (e.g. when ListGuid code does not match ListID) and when the user is not a subscribed user. |
...
Xmlunsubscribe.aspx (User unsubscription)
This function forces the unsubscription of a user subscriber from a list.
URL
URL: httpThe URL to use depends on your MailUp account's unique URL. If your MailUp admin console address is xyzw.espsrv.com, the correct action URL for the form (the URL of the form handler) will be http://newsletterxyzw.domainnameespsrv.tldcom/frontend/xmlUnSubscribeXmlunsubscribe.aspx
REQUEST PARAMETERS
...
Name | Mandatory? | Description |
ListGuid | Y | Alphanumeric code associated to a distribution list |
List | Y | List ID |
N (1) | User email address | |
Sms | N (1) | User mobile number, with international prefix (2) |
(1) either email or sms parameter must be specified
(2) if blank, international code for Italy will be used (0039)
RETURNED
RESPONSE VALUES
...
CODE | DESCRIPTION |
0 | User unsubscribed successfully |
1 | Generic error |
3 | User unknown / already unsubscribed |
Info |
---|
NOTE: |
...
If successfully unsubscribed, the user will be moved to unsubscribers and will receive an unsubscription confirmation email, if this option has been selected |
Updsubscriber.aspx (User update)
This function allows to update a user's personal data.
URL
URL: httpThe URL to use depends on your MailUp account's unique URL. If your MailUp admin console address is xyzw.espsrv.com, the correct action URL for the form (the URL of the form handler) will be http://newsletterxyzw.domainnameespsrv.tldcom/frontend/xmlUpdSubscriberUpdsubscriber.aspx
REQUEST PARAMETERS
AT ENTRANCE:Name | Mandatory? | Description |
ListGuid | Y | Alphanumeric code associated to a distribution list |
List | Y | List ID |
N (1) | User email address | |
Sms | N (1) | User mobile number, with international prefix (2) |
Replace | N | Parameter to enable or disable group replacement for the specified user. Accepted values: 0/1/false/true – Default value: false |
Group | N | Groups to which to subscribe the user |
csvFldNames | N | Personal data codes (separated by the ";" character) |
csvFldValues | N | Values related to personal data codes (separated by the ";" character) |
(1) either email or sms parameter must be specified
(2) if blank, international code for Italy will be used (0039)
RETURNED
RESPONSE VALUES
:CODE | DESCRIPTION |
0 | Data updated successfully |
1 | Generic error |