Troubleshooting marketing emails

Issues with email sending

If your contacts are not correctly receiving marketing emails, please check the following:

  • The emails are sent out using a scheduled task that is executed every 1 minute by default. You can check the status of the scheduled task in the Scheduled tasks application.

  • Go to Settings -> System -> Emails or Configuration -> SMTP servers and make sure your SMTP servers are configured correctly. See Configuring SMTP servers for details. You can try sending a test email on the Email tab of the System application.

  • Go to the Email queue application. You can find an error message for individual emails that failed to send. Email queue keeps attempting to send failed emails once a minute for the first hour. After you resolve the technical issue, you can resend all failed emails by clicking Resend all failed.

  • Make sure you are using correct email addresses.

  • Make sure the emails are not being blocked by an anti-spam software.

  • Email debugging can be helpful when solving problems with marketing emails. To enable email debugging, add the following keys to the configuration/appSettings section of your project’s web.config file:

    
    
    
      <add key="CMSLogEmails" value="true"/>
      <add key="CMSDebugEmails" value="true"/>
    
    
      
    • CMSLogEmails – logs all sent emails to the ~/App_Data/logemails.log file. The log contains each email’s:

      • Timestamp, identifying when the email was sent
      • Recipients
      • Sender
      • Subject
      • Custom headers inserted via the Kentico API
      • Custom header encoding (UTF-8 by default)
    • CMSDebugEmails – disables sending of emails to the actual recipients. The system only logs emails into the event log. Helpful if you need to test the functionality, but do not want the emails to actually reach the recipients.

      • To view the event log, open the Event log application.
      • The emails are logged as Information type events.
      • The Event code column contains the recipient’s address.
      • The system randomly generates Sending failed for <recipient’s email address> errors to simulate sending errors.

Issues with marketing emails on MVC sites

If your website is built using the MVC development model and you encounter problems when working with marketing emails, see the dedicated sub-page:

If your unsubscription links are not resolving correctly, check that the Base URL property of the given email feed is set correctly according to the domain name of your website. To configure this property:

  1. Open the Email marketing application.
  2. Edit () the email feed and switch to the Configuration tab.

Note: Marketing emails only contain valid unsubscription links when sending emails to actual recipients. Unsubscription links do not work in draft emails because the recipients are not linked to contacts in the system.

Issues when sending marketing emails to a large number of recipients

Restricting logging of sent marketing emails

By default, the system logs an event log entry for every sent marketing email. When mailing out to a very large number of recipients, this may lead to a cluttered event log or even website performance problems.

You can disable logging of marketing email changes (including send events) by adding the following key to the /configuration/appSettings section of your project’s web.config file:




<add key="CMSLogNewsletterIssueEvents" value="false" />


Opened marketing emails not being tracked

This can be caused by an incorrectly configured email feed. Make sure you double-check the configuration.

Another cause of email feed links not being tracked is an incorrect tracking link. This can be caused by your site not being accessible without the ‘www’ prefix. For example, you can access your site via www.example.com but not via example.com. To resolve this for a particular email feed:

  1. Open the Email marketing application.

  2. Edit () the email feed and switch to the Configuration tab.

  3. Change the Base URL field to:

    • www.example.com (use your site’s domain name instead of the example)
  4. Save.

Custom macros in sent marketing emails not resolving correctly

Custom macros used in marketing emails may not resolve correctly if they take macros dependent on subscriber context as parameters. For example, if you’re using a custom macro that takes the Recipient.FirstName macro as an argument, you need to call the custom macro with the subscriber resolver:
{% CustomMacro(SubscriberFirstName)|(resolver)subscriber %}

Note that this inconsistency occurs only in sent emails, email previews resolve macros differently.

When sending emails, the system automatically converts relative paths to absolute URLs for values placed into href and src attributes of HTML elements. However, other relative paths remain unchanged (for example, links inside the background-image property of an inlined CSS style).

To manually convert relative paths to absolute URLs based on the email feed’s Base URL, use the EmailFeed.GetAbsoluteUrl(relativeLink) macro method.




{% EmailFeed.GetAbsoluteUrl("/graphics/image.png") %}