====== Send Mailings ======

You have got a list of e-mail adresses and you want to invite the associated persons to a survey? In this case the mailing feature of SoSci Survey helps. You can find that function on the left side of the menu at **Invitation Mailings**.

One has __not__ to send the e-mails by SoSci Survey. There are a lot of programs for sending serial e-mails, e.g. [[http://www.vwsoft.de/?sectionid=pgminfo&pgmid=3|Newsletter Genius]] or [[http://www.supermailer.de/|SuperMailer]], for Thunderbird there are PlugIns to send mailings (e.g. [[https://addons.mozilla.org/de/thunderbird/addon/mail-merge/|Mail Merge]] oder [[http://mailtweak.mozdev.org/|Mail Tweak]]) and even Outlook in combination with Word can send mailings. Instructions can be found on the internet.


**Important**: If you want only recipients of the e-mail invitation to participate in the survey, set //Mailing// as [[:en:create:access|access restriction]] in the questionnaire. In the email you need to use the free variable parameter ''%link%''  instead of the regular [[:en:survey:url|survey link]].

**Important**: The function to send e-mails is not automatically unlocked on www.soscisurvey.com (apart from user accounts which were registered by certain University email adresses). An individual activation should prevent that bad people misuse SoSci Survey as a spam spin. If the sending of e-mails is not yet activated for your account, SoSci Survey shows an appropriate application form instead of the send option.

**Tip:** First test the function with your own e-mail address and/or that of your colleagues. If you have already imported email addresses into SoSci Survey, you can insert your own address into a separate subgroup and send the test mails only to this group.

**Tip:** Do the the [[mailing-checklist]] before sending to avoid errors.

**Tip:** If you want to create valid personalized links without sending an e-mail, you can use the [[:en:survey:mailing-api]].


===== External Mail Server =====

Sending invitation mails from an external server offers the following advantages:

  * One has not to import the e-mail adresses or contacts to SoSci Survey (of course SoSci Survey doesn’t divulge the adresses to third parties or use them otherwise)
  * Full controll of the sender’s names
  * No hint to SoSci Survey at the end of every e-mail
  * Further ways of sending mails (e.g. attachements) are only available in external programms

If you want to send the invitations by an external program, you either can send the survey link without further information or through the personalisation of a serial number. Personlized links allow...

  * a review of whom has filled out the survey
  * a restriction, so every participant can only once fill out the survey
  * a individual assignability of the data sets


For a personalized mail delivery you have to create the needed valid serial numbers by going to **Send Invitation** -> **Authentification Codes**. This numbers you can now assign to the participants (e.g. in a spreadsheet) and integrate the survey link into the email ([[url|Survey Link]]).
Set as [[:en:create:access|access restriction]] to the survey //serial number// so every participant with his/her serial number can only fill out the survey once.


===== Mail Delivery through SoSci Survey =====

Sending invitation mails through SoSci Survey offers the following advantages:

  * No external program is necessary
  * SoSci Survey creates the personalized link automatically
  * Individual participation status can easily be proved
  * SoSci Survey can asure that the datas will be collected pseudonymously and yet show the individual participation status
  * Mailings can be sent automatically at a given point of time
  * Delivery is clearly more comfortable if in the survey object several invitations need to be sent (e.g. several mailreminders or survey shafts)

Sending invitation mails through SoSci Survey works by clicking on **Invitation Mailings** in three steps:

  * Import of e-mail adresses (if necessary with name for a personalized salutation)
  * Creating the mailing (Content of the mail and if necessary setting the survey)
  * Planning the delivery for later or do it immidiatly

**Important**: If you send mailings through SoSci Survey you have to set as [[:en:create:access|access restriction]] in the survey //Mailing//. Now the access is unrepeatable and only possible with the personalized link from the invitation mail.

**Important**: Use the free variable parameter ''%link%'' for the survey link and __don’t__ enter the survey link directly. In this way you insure the delivery of personalized participation links.

==== Import E-mail Adresses ====

So that SoSci Survey can send e-mails, one has to import the e-mail adresses of the recipients. There are three ways to do that at **Invitation Mailings** -> **List of Contacts** -> //Import adresses//:

  * **Import a list of e-mail adresses.**\\ If you just want to import e-mail adresses (without names) this works very easily. You have to copy all adresses to the clipboard and paste them at //direct import// into the big textbox. It doesn’t matter if the e-mail adresses are seperated by a comma, stand in seperate lines or if there is another text in-between – SocSci Survey looks everything out what looks like an e-mail adress.
  * **Read a table with contacts.**\\ If you want to adress the recipient personal by his/her name, you need at least the name of the person. Are the contacts tabulated you can read in a CSV-File at **Import e-mail adresses** -> //Import via CSV-File//. OpenOffice Calc or Excel can save CSV-Files. The Assignement of columns of the table happens during the import.
  * **Manual entry of single adresses.**\\ This possibility is just useful for a small amount of adresses. You can find it at //Add single adresses//.

The created mailing list can also be downloaded as CSV-File ([[panel-download|Download mailing list]]).

**Important:** Select the privacy mode that is appropriate for your survey.


==== Privacy mode ====

You can choose between 4 privacy modes:

  * Person-related\\ A person identification (SERIAL) is displayed both in the data set and in the address list, which allows a unique reference between e-mail address and data set.
  * Pseudonymous\\ The participant is assigned a unique personal identification, but as project manager you have no access to it. SoSci Survey manages the assignment on a fiduciary basis (i.e. does not disclose it unless the project manager explicitly asks for it), so that the project manager cannot establish a direct relationship between e-mail addresses and data records.
  * Anonymize when Interview is Finished\\ This mode corresponds to the "pseudonymous" mode -- but the assignment of the data set to an address entry is deleted when the interview is finished (reaching the "last page" in the questionnaire). This also changes the value of the variable ''Serial'' to "~anonymous".
  * Anonymous\\ The reference between data record or participation link and address entry is not stored at all. In this mode, it is not possible to relate an address entry to a data record.

The privacy modes come with different benefits and limitations:

^Functionality ^  Anonymous  ^  Anonymize when finished  ^  Pseudonymous  ^  Person-related  ^
|Participation status in the address list |  {{::symbol.wrong.png?nolink&20|not possible}}  |  {{::symbol.correct.png?nolink&20|possible}}  |  {{::symbol.correct.png?nolink&20|possible}}  |  {{::symbol.correct.png?nolink&20|possible}}  |
|Reminder mail to participants who did not do the questionnaire |  {{::symbol.wrong.png?nolink&20|not possible}}  |  {{::symbol.correct.png?nolink&20|possible}}  |  {{::symbol.correct.png?nolink&20|possible}}  |  {{::symbol.correct.png?nolink&20|possible}}  | 
|Get SERIAL or participant data in interview using ''panelData()'' |  {{::symbol.wrong.png?nolink&20|not possible}}}  |  {{::symbol.correct.png?nolink&20|possible}}  |  {{::symbol.correct.png?nolink&20|possible}}  |  {{::symbol.correct.png?nolink&20|possible}}  | 
|Two-part data collection via [[:en:create:functions:mailresume#pause_questionnaire|break page]] (only one questionnaire/dataset) using [[:de:create:functions:mailResume]] |  {{::symbol.wrong.png?nolink&20|nicht möglich}}  |  {{::symbol.correct.png?nolink&20|möglich}}  |  {{::symbol.correct.png?nolink&20|möglich}}  |  {{::symbol.correct.png?nolink&20|möglich}}  |
|Relation of data records from multi survey waves |  {{::symbol.wrong.png?nolink&20|not possible}}  |  {{::symbol.wrong.png?nolink&20|not possible}}  |  {{::symbol.correct.png?nolink&20|possible}}  |  {{::symbol.correct.png?nolink&20|possible}}  |
|Address reference can be restored post-hoc (by the server operator) |  {{::symbol.wrong.png?nolink&20|not possible}}  |  {{::symbol.wrong.png?nolink&20|not possible}} (1)  |  {{::symbol.correct.png?nolink&20|possible}}  |  {{::symbol.irrelevant.png?nolink&20|not applicable}}  |
|Address-data relation directly visible |  {{::symbol.wrong.png?nolink&20|not possible}}  |  {{::symbol.wrong.png?nolink&20|not possible}}  |  {{::symbol.wrong.png?nolink&20|not possible}}  |  {{::symbol.correct.png?nolink&20|possible}}  |

**Note (1):** If a server backup has been created between sending the mailing and completing the questionnaire, a reconstruction of the assignment based on the database backup is not excluded.


==== Prepare a Mailing ====

Writing the e-mail is not that much different from doing it in a mail program. At **Invitation Mailings** -> **Mailings** you have to click on //New mailing// and enter the subject and text. However, there are some peculiarities.


=== Spaceholder and Personalization ===

The mailing differs from a normal mail in one important point: Every recipient should get a personalized link to the survey (to track the participation) and eventually the salutation should also be personal. For that one uses free variable parameter like ''%salut%'' (for the salutation) or ''%link%'' (for the survey link). To try this SoSci Survey shows a prewiev after saving.

How SoSci Survey formulates the salutation, can be adjusted below.

An overview about the different placeholder shows the chapter [[mailing-fields|Placeholder in mailings]]. 


=== Survey Link ===

At //Survey Link// you cannot only adjust which text is shown in the HTML-Mail for the survey link – if you have several surveys in your project you can also determine which survey should be filled out.


=== HTML-Mails ===

SoSci Survey supports the possibility sending HTML-Mails with formatting. Usually the good old textmails are sufficient (everyone can read them and they won’t soon be classified as advertisment/spam), but HTML-Mails support a formatation of the text (Sparingly!) and can arrange the survey actually as a hyperlink. This eliminates problems with not or incomplete clickable links.

If you want to send your e-mail as a combined text/HTML-Mail first of all prepare the content of the text. Then click //Create HTML from textversion// and change subsequently as required the HTML-Content.


==== Sending Emails ====

If you saved the mailing (//Close//) and got back to the overview of mailings, you'll find a button //Prepare Sending// below every mailing. Use this button to send emails immediately or later.

{{:en:survey:scr.mailing.sending.png?nolink|Prepare sending an mailing}}

During prepaartion, you can adjust if the mailing just goes to certain recipients (specified by email adress) __or__ if it goes to a certain subgroup. You can also determine for e.g. email reminders etc. which recipient of the original invitation will get this mail. 

In the end you have to decide if the mailing shall be sent immediatly or if the server shall send it automatically to a given time. The latter allows a comforable preparedness of delivery and reminder mails -- at the actual time of the delivery one has not to care about anything.

**Important:** Reminder mails are just recieved by those who got the original email to which the reminder mail refers. Depending on what further restriction you set, it ist just a subset of the recipients.

**Important:** If you send the e-mail immediatly the screen may show nothing at first. Please be patient for another 2 minutes.


===== Manage Mailinglist =====

In the menu item **Invitation Mailings** -> **List of Contacts** in the tab //Panel overview// one cannot only see the imported e-mail adresses but also the participation status of the adressee. The participation status is saved for every mailing -- choose for display //Show participation status for// the corresponding mailing.

If you click the edit symbol at one entry ({{:button.edit.gif?nolink|Edit}}) you can edit the entry and below you see a list of every mailing, which has been sent to the participant (incl. participation status). It is not displayed __when__ the participant accessed the survey. Because this would allow a clearly assignement to a data set and this would threaten the anonymity.

To resolve the mailinglist (e.g. deleting a subgroup, double adresses, etc.) you can find a useful function in the tab //Manage adresses//.


==== Faulty e-mail adresses ====

If an e-mail adress isn’t valid anymore SoSci Survey gets a corresponding error message -- this happens most of the time within 15 minutes. Sometimes it can happen that 2 days go by before the error message arrives. The program controls to which adress the message refers and marks the corresponding entry as faulty: The participation status is now blinking in red/orange and the entry is marked red in the list.

Faulty adresses don’t receive mailings in future -- unless you set back the error status. Therefore you have to edit the entry ({{:button.edit.gif?nolink|Edit}}) by clicking the corresponding button. 

If you know the correct adress of the participant you either could enter it directly ({{:button.edit.gif?nolink|Edit}}) or use the tab //Actualize adresses//. After the modification the error status will be set back automatically.

If you now want to send the mailing to the corrected adress, start the delivery of the original mailing once again. The mailing will be automatically send to that adresses which haven’t recieved the e-mail yet (see below).


==== Add adresses later ====

You can also pick up adresses to the mailinglist later. A mailing will basically send to every recipient once: This means that you can easily send the mailing once again – only the new adressees will get it.


===== Reminder Emails =====

Sending reminder e-mails works as follows:

  - Create a mailing and choose at //Reminder/Follow up e-mail for// the original invitation. **Important:** Always choose the original invitation although you want to send several reminder e-mails. If a participant clicks on the survey link in a reminder e-mail, the participation status will be entered in the original mail.
  - At //Type of the follow up mail// you have to choose "Reminder or Continuation".
  - Adjust the content of the mailing in the //Content// tab as required. The text must (as in the original mailing) contain a placeholder ''%link%'' for the personalized participation URL. 
  - After saving the new mailing (//Close//) you can //prepare a new delivery// at //Delivery options// and set at //Participation status// who should get the reminder e-mail.

Basically a reminder email will only be sent to those participants who also got the original invitation. Depending on the setting at //Participation status// only some adressees get a reminder.

**Important:** Every mailing will be delivered only once to every adressee. So you cannot send the reminder e-mail multiple times to the same adressee. If you want to remind the participants several times you have to create a new mailing per reminder-lap.

**Hint:** By the delivery of the reminder e-mail the survey link in the invitation will be invalid.


===== Mulitshaft survey =====

With the import, every e-mail adress will get an individual identification which appears as a serial number in the data later (only if the privacy mode for addresses is not set to "anonymous" or "anonymize"). This identification lasts until the e-mail adress is deleted from the project.

Hence multishaft surveys can be realized very easily: A mailing will be created and send for every shaft. Provided one has imported the e-mail adresses without serial numbers, the participants stay pseudoymous and one can still assign the data based on the serial number (variable SERIAL).

If you want to write in a later survey shaft only to these adressees who participated in the previous shaft you can use the Follow-up mail function. When you create the mailing you specify the //Reminder/Follow-up e-mail for// the previous mailing to which the new invitation is corresponded. At the delivery options one can choose that only these adressees get the e-mail who followed the other invitation.


===== Continue interviews =====

Provided one uses the mailing function or links with individual serial numbers SoSci Survey "recognizes" the participant. If the participant begins the survey, closes it in between and clicks on the personalized link at a later point of time, the participant can continue the survey at the same spot. 

However, in practice there is a problem with this function: Some participants just want to look at the survey at first (e.g. clicking through the survey without giving answers) and fill it out later. If SoSci Survey continues the survey these participants would only see the last page ("Thank you for your participation.") the second time they open the link.

Therefore SoSci Survey will check at the beginning if the participant has answered questions the last time at all. If the participant has answered more than 50 % of the asked questions (not all questions!), the survey will start on the first page. If the participant has answered at least half of the asked questions, the survey will continue directly.

As of version 2.3.06 the threshold to resume fragmentary interviews may be altered in a questionnaire's settings (**Assemble Questionnaire** -> tab or symbol "Settings"). Setting 0 % will disable the restart feature entirely. Please note that altering the setting may prevent respondents from doing the survey if they "just looked" the questionnaire earlier.


===== Serial numbers =====

Serial numbers will be especially helpful, if one doesn’t send e-mails via SoSci Survey but uses an extra program. Serial numbers fullfill 2 functions:

  - The survey with a serial number can only be filled out for one time. So one can ensure that every participant participates only once (this works also with the mailing function). In the survey one has to set at [[:en:create:access|access restriction]] the //serial number//.
  - The participant can interrupt the filling and continue it later. This works regardless of the set access restrictions.

If you create the serial numbers on your own and tell them SoSci Survey via **Authentification Codes** or if SoSci Survey (via the same menu bar) creates valid serial numbers, it won’t make a difference. The serial number can either be transfered directly to the participant in the [[:en:survey:url|survey link]] or -- especially useful in postal invitations -- tell the participants in the text. If the survey is opened with the access restriction "serial number" without serial number in the link, the survey will ask about it.

If one wants to do multishaft surveys there will be al little hurdle: The particpant gets the same serial number (because the data should assign each) so he/she can only continue the interview from the first time. The solution is banal: At **Authentification Codes** is a button //Reset response status//. After that every serial number gets a new interview.

**Note:** If there are several questionnaires in the survey project, you can fill in __each__ questionnaire once with a serial number.

===== Split a survey =====

If you do a multi-wave survey and need to rely on the earlier answers of a participant, it will be useful to interrupt the survey and continue it later (so in a second survey wave). This also will be useful if there are in a multi-wave survey largely different variables to collect (instead of the same survey every time) and one wants to have only one data line per case in the data set. For this to work the participant may not have come to the last page of the survey in the first wave.

To achieve this one has to put in a interruption page -- there where the survey should be interrupted the first time. To do that one puts in on one page (ideally there is no question but a friendly Goodbye of the first part) an element //PHP code// and in that the commands ''[[:en:create:functions:buttonhide|buttonHide()]]'' and ''[[:en:create:functions:option|option('resume', true)]]''.

To start the second survey wave, one has to delete the interruption page and tells the participants that they shall open the link (you can also send the link again) again. It then goes to the next page. The //back// button (provided it is switched on) also works -- if this is not welcome one can deactivate it by ''[[:en:create:functions:option|option('backbutton', false)]]'' on the first page of the second part.

