Message / notification related errors, mail not sent

Created on 10 December 2015, over 8 years ago
Updated 15 January 2024, 5 months ago

On two different sites (same message-notify module though), I have a problem with notifying subscribed users about updated tasks, as well as reactions to discussions. On one system a series of six errors continues to be produced until the queue is deleted. On the other there is only a a single list of errors. In both cases, no mail is sent.

I ventured into this particular error: htmlspecialchars() expects parameter 1 to be string. This parameter contains name and e-mail address of the sender/site in an array. These fields appear to be missing in the functions generating the other error messages.

Analysis:
Sending an HTML mail test message is successful
Sending an SMTP mail test message is successful

But when a task is changed for which the admin is subscribed:

1. Warning: strpos() expects parameter 1 to be string, array given in SmtpMailSystem->mailWithoutQueue() (line 95 of (...)/sites/all/modules/smtp/smtp.mail.inc).
2. Warning: preg_match() expects parameter 2 to be string, array given in SmtpMailSystem->mailWithoutQueue() (line 119 of (...)/sites/all/modules/smtp/smtp.mail.inc).
3. Warning: htmlspecialchars() expects parameter 1 to be string, array given in check_plain() (line 1571 of (...)/includes/bootstrap.inc).
4. The submitted from address () is not valid.
5. Notice: Undefined variable: mailer in smtp_send_queue_runner() (line 134 of (...)/sites/all/modules/smtp/smtp.module).
6. Notice: Trying to get property of non-object in smtp_send_queue_runner() (line 134 of (...)/sites/all/modules/smtp/smtp.module).
7. Error sending e-mail from to <test-e-mail address>
8. Processed 1 items from queue smtp_send_queue

message 3 may have a different cause. It is occurring before and after the event. Strangely enough in smtp settings 'use queue' is set and resend on error is not activated.

Same scenario on a different site (other smtp server, mail addresses, internationalisation activated):

1. Notice: Undefined property: Message::$user in oa_messages_mail_alter() (line 581 of (...)profiles/openatrium/modules/contrib/oa_core/modules/oa_messages/oa_messages.module).
2. Warning: strpos() expects parameter 1 to be string, array given in SmtpMailSystem->mail() (line 79 of (...)sites/all/modules/smtp/smtp.mail.inc).
3. Warning: preg_match() expects parameter 2 to be string, array given in SmtpMailSystem->mail() (line 101 of (...)sites/all/modules/smtp/smtp.mail.inc).
4. Warning: htmlspecialchars() expects parameter 1 to be string, array given in check_plain() (line 1571 of (...)includes/bootstrap.inc).
5. The submitted from address () is not valid.
6. Error sending e-mail (from to (my test-e-mail address)).

Messages 1 thru 6 are repeated in the same order, about once per second, flooding the log. 'Use queue' was not set in smtp settings. Setting it didn't change anything, though.

The same happens after subscribing to comments on discussions and issueing a comment.

Because I set up both systems, I may have made the same configuration error twice, but I don't have any clue on what may cause these symptoms. Similar errors documented on the internet were solved by suppressing the error messages. But I would like the messages to be sent, notifying the users about changes to their tasks or comments on their discussions. At the moment no such messages are getting through.

Help would be very much appreciated!

πŸ’¬ Support request
Status

Closed: outdated

Version

2.5

Component

Miscellaneous

Created by

πŸ‡³πŸ‡±Netherlands richardu

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024