Hi,
After updating a couple of modules, I get this error message when creating or editing a node, just after saving it. Note that there are rules that send emails when creating and modifying nodes.

Fatal error: Cannot use string offset as an array in /path/to/drupal/sites/all/modules/pmail/pmail.module on line 42

I disabled the module Personalized E-mails 6.x-1.x-dev (2010-Jul-11) and no more error message.

Comments

TAZ01’s picture

I get the same exact error, but not when I am saving a node. I get it when I am doing the test configuration of the SMTP settings
Or when you click on the "preview an example mail"

==========================
Test configuration

Recipient:myemail@myemail.com
Type in an address to have a test e-mail sent there.

Preview: For theming of HTML mails sent via Mime Mail, you can preview an example mail. (this link goes to mydomain.com/phpmailer/preview)
==========================

smk-ka’s picture

Title: Fatal error: Cannot use string offset as an array in /path/to/drupal/sites/all/modules/pmail/pmail.module on line 42 » Wrong parameters to hook_mail_alter()
Project: Personalized E-mails » Mime Mail
Category: support » bug

Hm, that's a bug with MimeMail: the format of hook_mail_alter has significantly changed between Drupal 5 and 6, and they're still on 5. hook_mail_alter() now receives a single array with message parameters. Although-- I'm not sure why MimeMail has to call this hook by itself, it should already have been run when mimemail() is invoked.

sgabe’s picture

Status: Active » Closed (duplicate)
smk-ka’s picture

Project: Mime Mail » PHPMailer
Version: 6.x-1.x-dev » 6.x-2.x-dev
Status: Closed (duplicate) » Fixed

PHPMailer indeed also contained that bogus hook_mail_alter() code to provide HTML mail previews using MimeMail. This code has now been removed from all branches. Reassigning back to PHPMailer and marking fixed.

Status: Fixed » Closed (fixed)

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