You are absolutley correct that hitting emailmandelivery.php will send out the queued emails. If you hit it with emailmandelivery.php?verbose=true
it will show you the status while it is running.
Please note that success does not imply the recipient recieved it, but rather that it was successfully processed and attempted to send to the given email address.
Here are the cron instructions for getting Email Lists to work.
EmailMan (aka Mass Emailer) processes emails that are scheduled to be sent from within Campaigns.The templated emails are sent to the recipients from a PHP script that needs to be run on a regular interval to send out the emails at the appropriate time. The user can choose which the templates from Campaigns as well as the sender name, sender email address (recommended to be no-reply@<your company .com>.or something similar to that), and the time and date to send the email.
When an email is processed a link is appened to the bottom of the email for recipients to opt out of recieving emails. This will link back to a page on the same machine as your sugar instance.
To get EmailMan working, you must first correctly configure the email settings in the admin section under configure settings (smtp) . EmailMan uses the same email server connection settings. Notifications do not necessarily have to be turned on, but the settings must be properly configured for recipients to properley recieve emails.
Second, EmailMan requires a scheduling program to run the PHP script. For Microsoft Windows, you can use the Task Scheduler. For UNIX, you can use cron. Examples for both are below.
Setting Up the Scheduled Reports Cron Job on UNIX
As a root user, type the following command at the shell prompt, replacing the 'path-to-sugarcrm' with your own path to the Sugar Professional installation directory and replacing the 'apache' with the proper username that the web server runs as (usually defaults to 'apache'):
/echo "0,10,20,30,40,50 * * * * cd /<path-to-sugarcrm>;
<path-to-php> ./emailmandelivery.php" | crontab -u apache/
This will setup a cron job to check every 10 minutes for whether any emails need to be sent out. If any do, EmailMan will process the template and send an email out immediately to the recipient.
For more information about how to specify different times for running the cron job, see the man page of cron:
/man 5 crontab/
Setting Up the Scheduler on Microsoft Windows
As a user with Administrator privileges, go to Start > Settings > Control Panel > Scheduled Tasks. Double-click on 'Add Scheduled Task'.(on xp it will be under the performance and maintanence section) When the Scheduled Task Wizard asks you for the program you want Windows to run, browse for the '/emailmandelivery.php/' file under your 'path-to-sugarcrm' directory. Continue with the rest of the Wizard, making sure you click on the 'Daily' option when asked when to perform this task.
Before you click on the Finish button for the Scheduled Task Wizard, check the box that says, 'Open advanced properties for this task when I click Finish.' A new dialog box displays after you click Finish. Click on the 'Schedule' tab and then on the 'Advanced' button. Check the box for 'Repeat task' and specify every 10 minutes with a duration of 24 hours.
You need to make sure that the you have configured settings in the Administration page under Configure Settings. If notifications work you should be able to use the Mass Emailer.
As for the schedule tasks I forgot to put the last step. When you are in the advanced properties You need to change the Run: to be <path-to-php> emailmandelivery.php and make sure the Start In: is the <path-to-sugarcrm>. I'll add this to the previous post too to make there be less confusion.
Thanks,
Majed Itani
__________________
Majed Itani
Software Engineer
SugarCRM Inc.
Bookmarks