Email Sending from Tendenci Sites

Tendenci is an open source web application that SENDS email through a properly configured smtp relay set up by your network administrator. Tendenci can also poll for email on another email server.

What Tendenci is NOT is an email server that receives email. It can only "retrieve" email from another email server for specific modules.

In other words - Tendenci only SENDS emails - and ONLY through an authorized email relay that is configured for your domain.

Configuration for OUTBOUND email sending from Tendenci is typically done by your network administrator given it is primarily a DNS configuration process. But we will start with the parts that the webmaster of the site should check as well as some links to help you work with your network provider.

On your Tendenci site

Webmasters check the following:

  1. Do this FIRST - check your site settings at [YOUR-DOMAIN]/settings/site/global/ 
  2. Submit a test contact form and see if you receive it. [YOUR-DOMAIN]/contact/
  3. Submit a custom contact form and see if you receive it. You may have to add it first at [YOUR-DOMAIN]/admin/forms/
    1. Remember you can always export your form entries (far right on the same page) [YOUR-DOMAIN]/admin/forms/

Developers check settings on your Tendenci site:

If you are a developer check your environment variables and settings.py files in Django. This documented for the various versions of Tendenci at https://tendenci.readthedocs.io/en/latest/

DNS CONFIGURATION FOR SENDING EMAIL FROM YOUR TENDENCI SITE

Start by checking your DNS configuration. At a command prompt you can type "nslookup -q=any example.org" or use a service like www.dnsstuff.com. Even if, especially if, you aren't technical, having this data is a great way to hold your team accountable. You don't have to understand it all to document missing or incorrect DNS entries. 

Why is this so hard? Unfortunately email protocols weren't designed for security so email providers are basically bolting on different technology to try and block spam. Starting with the basics - remember that Tendenci MUST relay through another email server that is configured properly in your DNS records. This varies by provider and the rules change. Daily. (Not by us, but by YOUR email provider.)

First things first - CHECK YOUR DNS CONFIGURATION! We can't emphasize this enough. If you haven't configured your DNS properly that is likely 95% of the time the issue. And remember, all providers adapt as the spammers adapt so just because you have your DNS configured correctly today does not mean that one day you won't suddently stop receiving notifications (deep breath - tendenci does preserve the submits - /admin/forms - scroll right - click "download form submissions" and you get a CSV.)

Verify your DNS configuration which varies by your relay provider

  1. DNS Stuff - New to DNS? A great resource is http://www.dnsstuff.com/ - type in your domain as "example.org" and it gives you a handy report that you can save as a PDF and email to your network administrator. But note that a LOT of the "info" items are really "required items" for many providers.
  2. MXToolbox - like DNS stuff but just for MX (email) records http://mxtoolbox.com/ 
  3. Developers and advanced users can use nslookup in terminal. One example:
    1. nslookup -type=mx example.org

Make sure your DNS configuration matches your chosen relay(s)

Some common email sending relays are:

  1. Check your MX, SPF, DKIM records for your email provider.  DO THIS FIRST AND START HERE http://www.dnsstuff.com/  !
  2. Amazon - your site must be configured to be an authorized sender through SES. This is documented here: http://docs.aws.amazon.com/ses/latest/DeveloperGuide/setting-up-email.html  
    1. Verify email sender - this requires your AWS administrator to send a test email from the AWS SES console and for you to CONFIRM it or it will not send. Period.
    2. DKIM records must be configured in DNS by your network administrator. If this is not done odds are the receiving email server will reject it. 
    3. NOTE: if you are hosted with the company Tendenci.com - submit a support ticket once your network administrator has set up their DNS per the instructions above.
  3. Google Apps - google apps for business also has a similar process and provides the data to you when you set it up.
    1. This is documented by google - we recommend googling it in case it changes - but for now the instructions are located at https://support.google.com/quickfixes/answer/6252374?hl=en
  4. Mailgun - this is a great outbound relay company with a generous 10k emails per month/free. Our company uses mailgun.
    1. Tendenci uses SMTP to send through mailgun. The instructions are located at https://documentation.mailgun.com/quickstart-sending.html with more docs on the tendenci readthedocs page linked above.
  5. Mandril - this used to be free but is now a paid mailchimp add on. https://www.mandrill.com/pricing/ - a viable option if you are using mailchimp already and want to relay your Tendenci email through the same relay. View their documentation on how to set it up.
  6. Microsoft Online - for Microsoft you will need to be a DNS expert and possibly have a phd. Their help docs are here http://www.msexchange.org/articles-tutorials/office-365/exchange-online/outbound-dkim-signing-office-365-part1.html but they actively change their configuration. If you switch to Microsoft or Azure - it is strongly recommended you coordinate this with your network administrator or you will get unexpected and inconsistent results. That is beyond the scope of this help file and really has nothing to do with Tendenci or any other web application.. Just know your DNS must match Microsoft's rules exactly and those rules do change. Contact Microsoft for more.

Other Common Issues we see:

  1. Your DNS provider changes their configuration.
    1. For example dnspark.net has changed their DNS server names over the years and some email providers don't like DNS forwarding. Check with your network administrator to verify your DNS configuration still matches as things change over time (hint - send them that PDF you generated above from DNSStuff.com). The Internet changes.
  2. Bad domain names. Do NOT use a canonical name of example.org - that is not a valid web name and can conflict with some email providers. You MUST use www.example.org or when a cloud provider moves your site to a new IP all of your DNS entries become invalidated. All cloud providers do this. So if you are using "example.org" as your web site you WILL 100% guaranteed have email sending problems in the future. (but it is OK to have "example.org" forward to "www.example.org" through your registrar. You can type the short version, but it is not your real canonical name.) A bonus for fixing your domain name is your search engine rank will go up. 
  3. Did I mention that skipping "www" is evil and will cause problems? If you think about it - your email is "person@example.org" which is the "Apex" of the domain (meaning no "www" - so you see how email and web can conflict, right?)
  4. SPAMMY Content in the email. If the submitter enters spammy content then it won't get delivered. This is mostly beyond your control but you can retrieve it at /admin/forms/ and "export entries". 
  5. File upload limitations - we've seen clients offer the option to upload logos only to have people try to upload 10GB Photoshop files. That isn't what Tendenci is for so it is recommended they LINK you to the files they need on Dropbox or similar.
  6. Blacklisted IP addresses or domains - if your admin uses a password like "password" then you will get hacked and when that happens your site could be sending thousands of spam emails causing the domain to be blocked globally. http://mxtoolbox.com/blacklists.aspx can check this for you

Yes email is complicated. You can thank the spammers for that. But using a trusted provider like www.mailgun.com has worked very well for most Tendenci implementations we have seen. Once you create an account they walk you through it. And then verify it all with http://www.dnsstuff.com/ 

BONUS BEST PRACTICES

  1.  GROUPS with common names - use them. Do not ever use personal emails like "bob.jones@gmail.com" - it just doesn't work and isn't sustainable. Instead create a GROUP in your domain like "webmaster@example.org" and then put Bob in the group.
  2. Check your DNS configuration regularly with http://www.dnsstuff.com/ 
  3. Avoid sending "out of office replies" to people outside of your domain as this can create loops and get you blocked.
  4. Call your network administrator before your hosting company because the odds are 95% that it is one of the issues above which aren't really web issues.