|
Table of Contents IntroductionCiviMail installation consists of four parts: enabling the CiviMail component, setting up the SMTP configuration options, defining a cron job that will actually send the scheduled mailing, and choosing and setting up the return email channel. If you want to have an email system that works properly we strongly recommend you read this entire chapter. Skiping over any of these steps can result in high bounce rates, which can get your domain blacklisted. If after following these instructions your email system does not work, please read this chapter again. An older, yet more detailed version of these instructions, can be found at http://en.flossmanuals.net/CiviCRM/SystemConfigurationhttp://en.flossmanuals.net/civicrm/ch042_system-configuration/ Setting Up CiviMailIf the CiviMail component is not enabled, go to CiviCRM > Administer > System Settings > Enable CiviCRM Components and enable CiviMail. Make sure your Organization Address and Contact info is set under /civicrm/admin/domain?action=update&reset=1 Go to CiviCRM > Contacts > Manage Groups and click the "settings" link for the group you want to make available to CiviMail. Check the box that says "Mailing List". Save your settings and repeat for each additional group you would like to send mailings. If you do not complete this step, you will not see any groups when you try to send a mailing. Drupal User and RoleFor CiviMail to work in Drupal you must create a Drupal user with permissions to
You can use an existing drupal user and role however we recommend that you use a dedicated user and role (name them something like 'mailsender') Setting Up the SMTP ConfigurationOutbound email setting are configured at: Administer > System Settings > Outbound Email (SMTP/Sendmail). The choices here are:
Setting Up the Cron JobTo have your mailing actually send, set up a cron job that will periodically poke CiviMail to send all of the mailings that are past their scheduled date. See Managing Scheduled Jobs for more details. There are two methods to run the cron: From a Control Panel or from a command line interface (CLI) which is the preferred way.
From a Control Panel
Using the shell (CLI)Make sure php-cli is installed by running the following command in the shell: If you see (cli) in the returned result, as in: This means you have php-cli installed and you should use it instead of a control panel because it offers several advantages:
CrontabThe following is complete cron configuration to handle CiviCRM's mail requirements. Put it into your crontab and adjust as needed. The user that run the scripts (www-data in this example) needs to be able to write into the temporary folder. Your configuration might specify a different user. You don't have to run both scripts at the same frequency. The preceding crontab file verifies every 5 minutes whether mail messages need to be sent, but only every 15 minutes whether bounced email needs to be processed. PARAMS contains:
Using wgetThe script to process CiviMail messages is cron.php in CiviCRM's bin directory. You can run this script using either "GET" or "POST" methods. However, using "POST" with the authentication values stored in a file on your server is generally considered to be better security practice. Learn more ... You can also trigger CiviMail to send scheduled mailings by navigating to this URL with your browser:
Setting Up the Return ChannelDo You Need the Return Channel?If you send emails and don't manage the bounce, you will be flagged as a spammer at one point or another. If you don't want that, you do want a return channel. The return channel is required at least in two cases. First, the return channel is required to track bounces and have the bouncing emails put on hold, as well as to track replies; if you don't need this functionality (you will still get the replies, you just won't be able to have stats about them), you don't need return channel handling. Second, the return channel is required if you want to handle SMTP (i.e., email-based) actions such as (un-, re-)subscribes and opt-outs - note that these actions have their HTTP (i.e., link-based) equivalents. Possible Solutions for the Return ChannelThere are four possible solutions for handling of the return channel. The current supported CiviCRM solution is CiviMail Processor, which polls the email account specified in Administer CiviCRM → Mail Accounts in defined intervals. If you absolutely need real-time return channel handling, there's our patched AMaViS solution. If you prefer a CiviMail-Processor-like solution in Perl for polling a given IMAP account, the community-supported imap2soap can handle the return channel for you. Finally, the easiest and most hands-free (albeit paid) solution is to setup an CiviSMTP account.
|
Labels
2 Comments
Hide/Show CommentsMar 18, 2009
Alan Dixon
What are the implications in a multi-site setup? Can you mix and match return channel solutions? Or is it per-code base?
Mar 19, 2009
David Greenberg
Alan - I'm not sure if the folks who might be able to answer this are monitoring wiki comments. If you haven't already posted this on the CiviMail forum - would be good to do so.