When logging is set to 'Log everything', it logs a message via Watchdog to say 'Sending mail to: @to'. Unfortunately, it uses the variable "$to", which doesn't exist.

Comments

DamienMcKenna created an issue. See original summary.

damienmckenna’s picture

Status: Active » Needs review
StatusFileSize
new448 bytes

This changes it to the correct $message['to'] variable.

Status: Needs review » Needs work

The last submitted patch, 2: smtp-n2651406-2.patch, failed testing.

damienmckenna’s picture

Status: Needs work » Needs review

The testbot just says "ERROR: No valid tests were specified.", meaning that it fails because there aren't any tests for the module. That's obviously not the fault of this patch :)

damienmckenna’s picture

This should be safe to include in the next release.

Anonymous’s picture

StatusFileSize
new30.45 KB

Works great for me. I tested with one other patch as well. Image of terminal included.

gadaniels72’s picture

Status: Needs review » Needs work
StatusFileSize
new17.57 KB

This patch work correctly for one of the two instances where an undefined $to is being used. The other is in smtp.mail.inc, line 53. The unpatched instance can be reproduced by checking send email by queue, entering a test email address, have logging set to all, and saving the configuration.

damienmckenna’s picture

StatusFileSize
new1.02 KB

@gadaniels72: Good catch!

This patch covers both bugs.

damienmckenna’s picture

Status: Needs work » Needs review
rjbrown99’s picture

Your latest patch in #8 needs a change - it's missing a $

FROM:
watchdog('smtp', 'Queue sending mail to: @to', array('@to' => message['to']));

TO:
watchdog('smtp', 'Queue sending mail to: @to', array('@to' => $message['to']));

Anonymous’s picture

I will patch this.

Anonymous’s picture

StatusFileSize
new1.03 KB
damienmckenna’s picture

Whoops! Thanks alex_drupal_dev!

gadaniels72’s picture

Status: Needs review » Reviewed & tested by the community

I tested alex_drupal_dev's patch from comment #12 and can confirm that the error messages in both instances have been resolved. Steps to test:

  • Configured smtp; turn mail queue on; turn log everythiing on
  • Sent test email message
  • Verified that no error message displayed on save
  • Ran cron
  • Verified that no error message displayed on that page
  • Edited configuration to turn mail queue off
  • Sent test email message
  • Verified that no error message displayed on save
Anonymous’s picture

No problem. Thanks for the comment. Happy to help patch it. :)

  • wundo committed 2553c19 on 7.x-1.x authored by alex_drupal_dev
    Issue #2651406 by DamienMcKenna, alex_drupal_dev, gadaniels72: Incorrect...
wundo’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.