CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Mail not sending
Pages: [1]

Author Topic: Mail not sending  (Read 1699 times)

leupi

  • I post frequently
  • ***
  • Posts: 192
  • Karma: 2
Mail not sending
November 04, 2009, 10:13:11 am
I have a test instance of CiviCRM running with Drupal 6. I have been able to successfully send myself a test message but when I try to create and send an email nothing happens. I am running this from the command line

wget 'http://cmstest/drupal/sites/all/modules/civicrm/bin/civimail.cronjob.php?name=admin&pass=admin&key=1234'

I know that the username, password, and key are not secure, this is just for testing at the moment. I entered the key in the civicrm.settings.php file and ran the command. The output was:


Code: [Select]
--2009-11-04 13:07:22--  http://cmstest/drupal/sites/all/modules/civicrm/bin/civimail.cronjob.php?name=admin&pass=admin&key=1234
Resolving cmstest... 127.0.1.1
Connecting to cmstest|127.0.1.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 176 [text/html]
Saving to: `civimail.cronjob.php?name=admin&pass=admin&key=1234.1'

100%[================================================================================>] 176         --.-K/s   in 0s     

2009-11-04 13:07:22 (12.2 MB/s) - `civimail.cronjob.php?name=admin&pass=admin&key=1234.1' saved [176/176]

I don't see anything there that tells me that it was not successful, however, the email never sends. When I go to get a report, I get this:

Quote
Delivery has not yet begun for this mailing. If the scheduled delivery date and time is past, ask the system administrator or technical support contact for your site to verify that the automated mailer task ('cron job') is running - and how frequently. (learn more...)

Any thoughts on what I am doing wrong are appreciated.

Thanks,
Todd

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Mail not sending
November 04, 2009, 12:51:09 pm

what are the contents of this file:

civimail.cronjob.php?name=admin&pass=admin&key=1234.1

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

leupi

  • I post frequently
  • ***
  • Posts: 192
  • Karma: 2
Re: Mail not sending
November 05, 2009, 06:15:41 am
I did not modify the contents of that file at all. I did, however, see something in there that I was not sure of. This script is located in /opt/lampp/htdocs/drupal/sites/all/modules/civicrm/bin. As you will see below there is the following line:
Code: [Select]
require_once 'CRM/Mailing/BAO/Job.php';
Should that not be referencing
Code: [Select]
require_once '../CRM/Mailing/BAO/Job.php';
because the directory 'CRM' is actually within the directory 'civicrm', which is one up. I did make the change and reran it, but still no luck. I appreciate your help with this.

Thanks,
Todd


Code: [Select]
<?php

/*
 +--------------------------------------------------------------------+
 | CiviCRM version 3.0                                                |
 +--------------------------------------------------------------------+
 | Copyright CiviCRM LLC (c) 2004-2009                                |
 +--------------------------------------------------------------------+
 | This file is a part of CiviCRM.                                    |
 |                                                                    |
 | CiviCRM is free software; you can copy, modify, and distribute it  |
 | under the terms of the GNU Affero General Public License           |
 | Version 3, 19 November 2007.                                       |
 |                                                                    |
 | CiviCRM is distributed in the hope that it will be useful, but     |
 | WITHOUT ANY WARRANTY; without even the implied warranty of         |
 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.               |
 | See the GNU Affero General Public License for more details.        |
 |                                                                    |
 | You should have received a copy of the GNU Affero General Public   |
 | License along with this program; if not, contact CiviCRM LLC       |
 | at info[AT]civicrm[DOT]org. If you have questions about the        |
 | GNU Affero General Public License or the licensing of CiviCRM,     |
 | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
 +--------------------------------------------------------------------+
*/

/**
 * A PHP cron script to run the outstanding and scheduled CiviMail jobs
 * initiated by Owen Barton from a mailing sent by Lobo to crm-mail
 *
 * The structure of the file is set to mimiic soap.php which is a stand-alone
 * script and hence does not have any UF issues. You should be able to run
 * this script using a web url or from the command line
 */

function processQueue( ) {
    require_once 
'CRM/Mailing/BAO/Job.php';
    
CRM_Mailing_BAO_Job::runJobs();
}

function 
run( ) {
    
session_start( );                               
                                            
    require_once 
'../civicrm.config.php'; 
    require_once 
'CRM/Core/Config.php'; 
    
    
$config =& CRM_Core_Config::singleton(); 

    
// this does not return on failure
    
CRM_Utils_System::authenticateScript( true );

    
// we now use DB locks on a per job basis
    
processQueue( );
}

run( );

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Mail not sending
November 05, 2009, 06:43:17 am

No, we set the include path which does the right thing

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

leupi

  • I post frequently
  • ***
  • Posts: 192
  • Karma: 2
Re: Mail not sending
November 05, 2009, 07:14:43 am
So that script should be fine as is, with no modifications required on my part? I've tried it both ways and neither way seemed to do anything.

Thanks

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Mail not sending

This forum was archived on 2017-11-26.