How to prevent Limesurvey email invitations or reminders being treated as spam

Spam really is a problem these days and without spam filters, email would hardly be useable. But this also causes problems when sending email invitations or reminders at Limesurvey. Often users complain not having received an invitation/reminder email because the user’s spam filter treated the email as spam.

Spam filters

If an email is treated as spam mostly depends on the spam filter being used and its settings. A spam filter usually checks the sender address and the email subject and content, so there are ways and means to influence how they treat your Limesurvey invitation and reminder emails.

Tips & Tricks

(The following list will be updated every now and then)

Sender address

  1. Use a valid sender address (can be set at the Limesurvey survey settings -> General -> Admin email).
  2. Do not use a sender address from a one time email provider. These are often used for spam and therefore blacklisted by most spam filters. Email from email providers like Gmail, Hotmail, GMX and the like might also be considered as spam quite often because everybody can get an account there.
  3. If possible use a sender address which has been in use for years and was never related to any spamming, e. g. your company’s email address.

Sending emails in batches

If you have to send several hundred or even several thousand emails this can really be painful. When sending them all at once using a huge email batch size (see details below at “Mailserver”) the script will most probably time out. Furthermore, there is a high risk of being treated as spammer so your IP address or domain could be put on a blacklist. And if you send them manually you will need a lot of coffee to not fall asleep when clicking the send button 50, 70 or 100 times.

The best approach for sending a huge amount of emails is using cronjob scripts. For this we have coded a script to automtically send email invitations. There is also another script for automatically sending email reminders.
You just upload the script to your server and set which survey(s) the script should deal with. Afterwards, you can set up a cronjob to call the script every X minutes. So if you need to send 3000 emails, just set the batch size to 50, call the script every 5 minutes and within 5 hours (50*12*5=3000) you are done without any further user interaction required. Of course these scripts only send an invitation once so users do not get spammed.

Sending emails this way significantly reduces the risk of your emails being treated as spam or being blocked. If your provider sets a certain limit of max X emails every Y minutes you can easily work around that by adjusting the cronjob details accordingly to not hit such limits.

Email content

  1. The content of your email is probably the most important part. Do never use any words like “free”, “buy”, “sex”, “shop”, “viagra” or the like at your email invitation or email reminder texts. You can change the default texts at the “email templates” link of the survey options menu.
  2. Same for the email subject: Use a meaningful text that maybe doesn’t use the word “invitation” because it can be found at spam emails quite often.
  3. If you send the exact email text several times, this might also look suspicous to spam filters. The solution is to use the {FIRSTNAME}/{LASTNAME} email placeholders at the Limesurvey email templates to create some unique strings.
  4. Often it’s worth a try to switch from HTML emails (Limesurvey default setting) to raw text emails. At Limesurvey this can be changed at Survey settings -> Tokens -> “Use HTML format for token emails” = “no”.
  5. Spammers often use images for fake emails, so better not use any images at your emails.
  6. Of course you want to add a link to the survey at your invitation and reminder emails. But generally links should be reduced to a minimum and opt-out links are often used for fishing, so if you are facing serius spam problems, not adding any links at all might help.
  7. When using HTML emails and editing the email messages, check that the HTML being used has a valid HTML syntax, e. g. all tags should be closed properly. There are several HTML validators available, e. g. the official W3C validator where you can copy paste the HTML code. You can view the HTML source code text by switching the editor to source code mode:
    Source code mode of integrated Limesurvey editor


  1. Emails can either be sent by the webserver using PHP emailing which is the Limesurvey default setting or by connecting to an SMTP server. Since PHP emailing is mostly used for spam, we recommend to switch to SMTP if you are facing spam problems. At Limesurvey this can be configured at Global settings -> Email settings -> “Email method” = “SMTP”
  2. Especially when using “PHP” email setting, some webservers will block emails if a certain amount of emails is send in a minute/an hour/a day. So make sure that when manually sending the emails the batch size is not too big. This can either be set when sending email at the token screen or by editing Limesurvey’s default setting (50) at Global settings -> Email settings -> “Email batch size” = “XYZ”.
  3. If possible use a webserver which hasn’t been connected to spamming anyway. Spam filters also analyse the IP range a server belongs to and if there have been spam issues with this range before. So using your company’s server or the SMTP server of known providers such as Gmail should help.
  4. A wrong mailserver configuration also influences spam filters. There are several different settings that could be wrong. We are currently collecting some of them and will update this section later.
    The experts out there can have a look at the email source code to check some of the sender server configuration settings like email header, spam score (if available), …

Additional information and tools:

Cronjob scripts for automatic email sending


Limesurvey forums / Limesurvey manual