This shows you the differences between two versions of the page.
email_campaigns [2013/09/03 15:14] admin [Managing the Scheduler] |
email_campaigns [2013/09/19 16:18] (current) admin [Managing the Scheduler] |
||
---|---|---|---|
Line 81: | Line 81: | ||
- To insert variables, select the value the variable should contain using the drop-down menus next to "Insert Varaibles," name the variable, and slick **Insert**. This will automatically insert the variable into the email body. You can also copy and paste the variable name into the subject field. | - To insert variables, select the value the variable should contain using the drop-down menus next to "Insert Varaibles," name the variable, and slick **Insert**. This will automatically insert the variable into the email body. You can also copy and paste the variable name into the subject field. | ||
- To add HTML to the page, click the **HTML** button in the top left of the "Body" editing window. A pop-up will open and allow you to add HTML code. Click **Update** in the pop-up window when finished with the HTML. | - To add HTML to the page, click the **HTML** button in the top left of the "Body" editing window. A pop-up will open and allow you to add HTML code. Click **Update** in the pop-up window when finished with the HTML. | ||
- | - To insert an opt-out/unsubscribe link in HTML, add a paste the tracker URL from the Unsubscribe tracker (created in another stage). It should look something like: <a href="http://customer.consortiumservicesllc.com/ReverseProxy/SugarCRM_Consortium/index.php?entryPoint=removeme%26identifier={MESSAGE_ID}">Unsubscribe</a>. For plain text emails, simply paste the full URL into the text. | + | - To insert an opt-out/unsubscribe link in HTML, add a paste the tracker URL from the Unsubscribe tracker (created in another stage). It should look something like: <a href="http://customer.consortiumservicesllc.com/ReverseProxy/SugarCRM_Consortium/index.php?entryPoint=removeme%26identifier={optout}">Unsubscribe</a>. For plain text emails, simply paste the full URL into the text. **It is important that the name inside the {} matches the name of the tracker!** |
- When finished, click **Save** at the top of the page. | - When finished, click **Save** at the top of the page. | ||
Line 118: | Line 118: | ||
* **Tracker Name:** Enter a tracker name for your reference; use alpha-numeric characters. Example: Register Now! | * **Tracker Name:** Enter a tracker name for your reference; use alpha-numeric characters. Example: Register Now! | ||
* **Tracker URL:** Enter the tracker URL and click Create Tracker. To create additional tracker URLs, click Create Tracker again. Example: http://www.sugarcrm.com. | * **Tracker URL:** Enter the tracker URL and click Create Tracker. To create additional tracker URLs, click Create Tracker again. Example: http://www.sugarcrm.com. | ||
- | * **Opt-out Link:** Select this box to identify the tracker URL as an opt-out link and embed your “Unsubscribe” instructions in a tracker URL. By default, the system uses the removeme.php file which contains these instructions, and displays this file name in the Tracker URL field. Note: If you do not select the Opt-out link option, then the system inserts the default opt-out link. So, if you do not want to include an Opt-out link in your campaign message, select the Opt-out option but do not insert the link in the campaign message. | + | * **Opt-out Link:** Select this box to identify the tracker URL as an opt-out link and embed your “Unsubscribe” instructions in a tracker URL. By default, the system uses the removeme.php file which contains these instructions, and displays this file name in the Tracker URL field. Note: If you do not select the Opt-out link option, then the system inserts the default opt-out link. So, if you do not want to include an Opt-out link in your campaign message, select the Opt-out option but do not insert the link in the campaign message. Click the **Create Tracker** button for each tracker that you create, and click **Next** when finished. |
- On the Target Lists screen select or create target list(s) for use with your campaign. The target list(s) appears under the Target List Name below. Click either **Save and Continue** to move to the Marketing Email screen, or click **Finish** to view a summary of the campaign and enter the marketing email information at a later time. | - On the Target Lists screen select or create target list(s) for use with your campaign. The target list(s) appears under the Target List Name below. Click either **Save and Continue** to move to the Marketing Email screen, or click **Finish** to view a summary of the campaign and enter the marketing email information at a later time. | ||
* To use an existing target list: click **Select.** | * To use an existing target list: click **Select.** | ||
Line 171: | Line 171: | ||
* **Unsubscribe Links:** Links can be included to allow targets to unsubscribe themselves from your campaign mailing list. You can embed an "Unsubscribe" link in a tracker URL. When targets click on this URL to unsubscribe from your campaign emails, the system logs the action for your records. | * **Unsubscribe Links:** Links can be included to allow targets to unsubscribe themselves from your campaign mailing list. You can embed an "Unsubscribe" link in a tracker URL. When targets click on this URL to unsubscribe from your campaign emails, the system logs the action for your records. | ||
====Creating Tracker Redirect Links==== | ====Creating Tracker Redirect Links==== | ||
+ | |||
+ | **IMPORTANT: The Tracker Name used in all email templates is "optout". Use this name!** | ||
- From the Campaign module, select the desired campaign. | - From the Campaign module, select the desired campaign. | ||
- On the Campaign detail page, scroll down to the Tracker URLs sub-panel, and click **Create**. | - On the Campaign detail page, scroll down to the Tracker URLs sub-panel, and click **Create**. | ||
- On the Campaign Trackers page, enter information for the fields as described in the Field/Description table below. | - On the Campaign Trackers page, enter information for the fields as described in the Field/Description table below. | ||
- | * **Tracker Name:** Enter a tracker name for your reference; use alpha-numeric characters. Example: Register Now! | + | * **Tracker Name:** Enter a tracker name for your reference; use alpha-numeric characters. This name is very important! This name is used when entering the tracker URL into an email template! The end of the URL will look like "identifier={optout}". |
* **Tracker URL:** Enter the tracker URL and click Create Tracker. To create additional tracker URLs, click Create Tracker again. Example: http://www.sugarcrm.com. | * **Tracker URL:** Enter the tracker URL and click Create Tracker. To create additional tracker URLs, click Create Tracker again. Example: http://www.sugarcrm.com. | ||
* **Opt-out Link:** Select this box to identify the tracker URL as an opt-out link and embed your “Unsubscribe” instructions in a tracker URL. By default, the system uses the removeme.php file which contains these instructions, and displays this file name in the Tracker URL field. Note: If you do not select the Opt-out link option, then the system inserts the default opt-out link. So, if you do not want to include an Opt-out link in your campaign message, select the Opt-out option but do not insert the link in the campaign message. | * **Opt-out Link:** Select this box to identify the tracker URL as an opt-out link and embed your “Unsubscribe” instructions in a tracker URL. By default, the system uses the removeme.php file which contains these instructions, and displays this file name in the Tracker URL field. Note: If you do not select the Opt-out link option, then the system inserts the default opt-out link. So, if you do not want to include an Opt-out link in your campaign message, select the Opt-out option but do not insert the link in the campaign message. | ||
Line 187: | Line 189: | ||
=====Managing the Scheduler===== | =====Managing the Scheduler===== | ||
+ | ====The Normal Way==== | ||
- Log in as Administrator and click on the **Admin** link at the top right of the page. | - Log in as Administrator and click on the **Admin** link at the top right of the page. | ||
- Scroll down to the "System" section and click **Scheduler**. | - Scroll down to the "System" section and click **Scheduler**. | ||
Line 194: | Line 197: | ||
- Use standard crontab notation for basic setup, or click the **Show Basic Options** link next to "Interval" to get a more user-friendly option selection. | - Use standard crontab notation for basic setup, or click the **Show Basic Options** link next to "Interval" to get a more user-friendly option selection. | ||
- Click **Save** when finished. | - Click **Save** when finished. | ||
+ | - SugarCRM does not actually create a cron job, it must be created on the server manually. Log onto the CRM server as root and edit **/etc/crontab**. Add an entry identical to the cron settings in the Scheduler Settings page in Sugar. Enter: <code>0 * * * * www-data php5 /var/www/sugarcrm/cron.php</code> assuming that: you want it to run every hour on the hour, every day of the week, as the user www-data, using the php5 interpreter, and the cron script is located in /var/www/sugarcrm/. These are a lot of assumptions; adjust them as needed. | ||
+ | - SugarCRM is finicky when it comes to the Scheduler. The settings in the Scheduler Settings page must match the crontab entry. Sometimes emails simply don't get sent, and it takes a log time to troubleshoot schedule problems. There is a better way. | ||
+ | |||
+ | ====The Better Way==== | ||
+ | |||
+ | - Download the script **send_from_email_queue.py** from the SVN server at http://10.253.1.48/svn/SUGARCRM_AutoFormFill/ | ||
+ | - Place the script somewhere on the SugarCRM server. I placed it in the root of the CRM directory. | ||
+ | - Put an entry in **/etc/crontab** similar to:<code>0 * * * * root python /path/to/send_from_email_queue.py</code> This is useful because it forces Sugar to send a batch of emails and ignores Sugar's schedule. More notes are located inside the script. | ||
+ | - The size of the email batch is configured in Sugar under **Admin > Campaign Email Settings**. | ||
+ | |||
+ |