Skip to content

Frequently asked questions ​

1. How can I personalize mailing content? ​

Basic content personalization works by inserting tokens that start and end with a % (percent) sign. When a newsletter is created, these parameters expand to values from the database:

ParameterData inserted into the content by the system
%email%Recipient's email address
%gsm%Recipient's mobile number
%name%Recipient's name
%prop[1-9]%Recipient property value (database field), depending on the data structure settings1. See the example below.
%cust_[nazwa]%Extended property values according to the system's database structure, where [nazwa] is the property (field) name in the system.
%confirm_link%Link confirming the request to subscribe the address
%profile_link%Link to a page where the profile can be edited
%remove_link%Link removing the address from the database
%mainkey%Recipient data modification key
%uid%Customer UID
%key%Customer database modification key

[^1] Check which categories properties represent in SARE's data structure preferences.

Usage:

If properties 1 and 2 in the data structure settings contain the newsletter recipient's first and last names, respectively, this text:

Mr/Ms %prop1% %prop2%

will be replaced during sending with, for example:

Mr/Ms Jan Kowalski

Similarly, a link in this text:

To unsubscribe from the list, visit: %remove_link%

will be replaced during sending with the appropriate link. Clicking it automatically removes the address from the database.

Warning

All properties except links can be used in the message subject.

2. Why can't I import a newsletter ZIP file into SARE? ​

The usual cause is an incorrectly prepared .zip file. The HTML file must be named index.html and must not be placed inside an additional directory.

If the newsletter has a text version as well as HTML, the text file should be named index.txt.

Other files included with the HTML version, such as images, may be stored in another folder. They must use only these extensions, in lowercase: .jpg, .jpeg, .gif, .png.

3. Can an email recipient unsubscribe from only one database (group)? ​

The system can remove an address from selected groups only. Replace the standard unsubscribe link with:

http://s.enewsletter.pl/rfg.php?u=%uid%&mkey=%mainkey%&g=24,25

The numbers at the end mean the newsletter recipient will be removed from groups with IDs 24 and 25. To let subscribers unsubscribe from a different group, put that group's ID at the end of the link.

When using group unsubscribe links, keep the groups permanent: do not delete them.

4. How can I use a variable sender for outgoing messages? ​

A. Sender defined by a database property ​

Alongside recipient addresses, the address database can define the message sender. This is useful when sending many messages from different senders. Prepare this structure:

EmailSender nameSender email address

Where:

Email is the recipient's email address.

Sender name is the outgoing message sender's name (database property 1: prop1).

Sender email address is the outgoing message sender's email address (database property 2: prop2).

After preparing the database, insert this code in the newsletter's HTML source:

php
<!--sare
$nadawca=get_val("prop1");
$email=get_val("prop2");
system_setfrom($email, $nadawca);
sare-->

prop1 is property 1 containing the sender's name.

prop2 is property 2 containing the newsletter sender's email address.

B. Sender based on the consultant's group ​

The sender can also depend on the consultant's group. If groups are configured accordingly in the database, prepare a newsletter with a variable sender by placing the following code in its HTML source:

php
<!--sare
if(sare_in_group(6)) {
  $nadawca="Newsletter SARE - CS";
  $email="cs@sare.pl";
} elseif (sare_in_group(7)) {
  $nadawca="Newsletter SARE - Marketing"; $email="marketing@sare.pl";
}
system_setfrom($email, $nadawca);
sare-->

This sends messages from cs@sare.pl for addresses in group 6, or marketing@sare.pl for addresses in group 7.

Customize the group numbers and these values:

$nadawca="Sender name"

$email="przyklad@sare.pl"

5. Can discount codes be generated automatically? ​

To generate random discount codes for email addresses in the database, create a property to store the codes. Then, in SAREscript -> Run, select the group for which you want to generate codes and enter:

php
$znaki = "1234567890abcdefghijklmnoprstuwxyz";
$kod = '';
for ($i = 1 to 8 ) {
  $kod = $kod.substr($znaki, rand(0,33), 1);
}
set_val("kod_rabatowy",$kod);

Explanation:

kod_rabatowy is the property name in SARE.

for determines how many characters the code contains.

$znaki defines the available characters (the example uses lowercase letters and digits).