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) »
  • EmailProcessor.php can NEVER process replies
Pages: [1]

Author Topic: EmailProcessor.php can NEVER process replies  (Read 889 times)

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
EmailProcessor.php can NEVER process replies
January 07, 2011, 03:40:28 am
This is a serious defect in 3.3.2 which means that EmailProcessor.php and CivimailProcessor.php can NEVER process a reply.

This is the code starting at line 227 of bin/EmailProcessor.php ...

Code: [Select]
                        $params = array ( 'job_id'         => $job,
                                          'event_queue_id' => $queue,
                                          'hash'           => $hash,
                                          'bodyTxt'        => null,
                                          'replyTo'        => $rt,
                                          'bodyHTML'       => null,
                                          'fullEmail'      => $mail->generate()
                                          );
                        civicrm_mailer_event_reply( $params );

Note that 'bodyTxt' is set to null.

This is the code that is called in civicrm_mailer_event_reply(), starting on line 252 of api/v2/Mailer.php ...

Code: [Select]
    $errors = _civicrm_mailer_check_params( $params, array('job_id', 'event_queue_id', 'hash', 'bodyTxt', 'replyTo') ) ;
 
    if ( !empty( $errors ) ) {
        return $errors;
    }

Since 'bodyTxt' is null, this code can never succeed. $errors is an array that contains "Required parameter missing: bodyTxt" but this error is ignored by the calling code.

Ken

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: EmailProcessor.php can NEVER process replies
January 07, 2011, 05:13:41 am
Hi,

Well spotted.

The calling says
                       // instead of text and HTML parts (4th and 6th params) send the whole email as the last param
 
but the error test doesn't take into account the last param, only bodyTxt & bodyHTML

Piotr, bodyTxt can be empty (stupid, but you can have empty email or html only) isn't it ? We should modify the test.

ken, can you create  an issue?

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: EmailProcessor.php can NEVER process replies
January 07, 2011, 12:41:47 pm
Created issue CRM-7340

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • EmailProcessor.php can NEVER process replies

This forum was archived on 2017-11-26.