Subscribe.aspx
This function is contained in predefined subscription forms: it allows users to sign up to a newsletter using a double opt-in method.
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:
<form method="post" action="http://esempio.emailsp.net/frontend/subscribe.aspx">
Action address is linked to the console address. If the console address is xyzw.espsrv.com, correct action is http://xyzw.espsrv.it/frontend/subscribe.aspx. Parameters for calling subscribe.aspx function are described below
Email field (mandatory):
<input name="email" type="text" size="60" maxlength="100">
Fields related to distribution lists (mandatory):
<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:
<input name="list" type="checkbox" value="2">Seconda lista <br> <input name="list" type="checkbox" value="3">Terza lista <br>
If you wish to subscribe a user to more than a list, without him choosing one of them, you can use:
<input type="hidden" name="list" value="1,2,3">
In case a user subscribes to more than a list, the system will send just one confirmation email, which will enable the subscription to all the lists. Conventionally, the system will use the confirmation email and the message pages of the first of the enabled lists (list 1 in the example above)
The “value” field must contain the ID of the list the user subscribes to; list ID can be found at the page 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 number (optional): To record the mobile number the following fields must be added to the form:
<input id="prefix" value="0039" type="text" name="prefix" /> <input id="sms" type="text" name="number" />
Please note that the field “prefix” (international prefix) need 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 for clarity’s sake.
Groups (optional):
<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 groups, without choice, type must be “hidden”, as in the example given below:
<input name="group" type="hidden" value="2,8,10">
This way, the user is automatically subscribed to groups 2,8 and 10. Group IDs are listed at the page Settings > Codes table in the MailUp console.
Personal data fields (optional):
<input name="campo1" type="text" size="60" maxlength="100"> Name <input name="campo2" type="text" size="60" maxlength="100"> Surname
In the form it is the customer’s responsibility to set the fields, dropdown menus, colors, styles, checkboxes, controls, freely based on one’s needs. The fields which are not necessary can be removed from the registration form. Standard MailUp nomenclature “field1”, “field2”,… “fieldN” must be used. If there are extra fields with names which are not recognized, they will be ignored.
All parameters to be passed (name=list, group, field1, field2…) can be of any type (type=checkbox, text, radio, button…) and they can assume any value.
Example of Codes Table
Campi per modificare nome e/o indirizzo e-mail del mittente:
<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 to send a subscription confirmation message with personalized sender, and, in case both have been specified, they will be set as key 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 this 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 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 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 "subscribe.aspx" API described above.
URL: http://newsletter.domainname.tld/frontend/xmlSubscribe.aspx (replace the part marked in red with the actual third level domain)
INPUT 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 ";" character) |
csvFldValues | N | Values related to personal data codes (separated by ";" 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, international code for Italy will be used (0039)
(3) for further details on how to use these fields, please see the section about the "subscribe.aspx" function
OUTPUT VALUES:
CODE | DESCRIPTION |
0 | Operation completed successfully |
1 | Generic error |
2 | Invalid email address or mobile number |
3 | User already subscribed |
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"
Third level domain name for a console
Xmlchksubscriber.aspx (User subscription check)
This function performs a check on a user subscription status
URL: http://newsletter.domainname.tld/frontend/xmlChkSubscriber.aspx
INPUT 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)
OUTPUT 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) |
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 subscribed.
Xmlunsubscribe.aspx (User unsubscription)
This function forces the unsubscription of a user from a list.
URL: http://newsletter.domainname.tld/frontend/xmlUnSubscribe.aspx
INPUT 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)
OUTPUT VALUES:
CODE | DESCRIPTION |
0 | User unsubscribed successfully |
1 | Generic error |
3 | User unknown / already unsubscribed |
NOTE:
If successfully unsubscribed, the user will be moved to unsubscribed 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: http://newsletter.domainname.tld/frontend/xmlUpdSubscriber.aspx
INPUT 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) |
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 ";" character) |
csvFldValues | N | Values related to personal data codes (separated by ";" character) |
(1) either email or sms parameter must be specified
(2) if blank, international code for Italy will be used (0039)
OUTPUT VALUES:
CODE | DESCRIPTION |
0 | Data updated successfully |
1 | Generic error |