Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Extra email is sent without body which triggers an error message: "Unable to send email. Contact the site administrator if the problem persists.".
Proposed resolution
Fetch email message with send parameter set to FALSE.
In line 31 of InviteByEmail.php the mail message is fetched by calling the mail plugin and the ->mail function without the send parameter set to false which triggers an extra email to be sent.
$message = $mail->mail('invite_by_email', $mail_key, $invite->get('field_invite_email_address')->value, $invite->activeLangcode, array(), $invite->getOwner()->getEmail());
Which should be:
$message = $mail->mail('invite_by_email', $mail_key, $invite->get('field_invite_email_address')->value, $invite->activeLangcode, array(), $invite->getOwner()->getEmail(), FALSE);
Comment | File | Size | Author |
---|---|---|---|
#6 | invitebyemailsendfalse-2866589-5.patch | 804 bytes | rahul.nahar001 |
#2 | invitebyemailsendfalse-2866589-1.patch | 948 bytes | pontus_nilsson |
Comments
Comment #2
pontus_nilssonComment #3
pontus_nilssonComment #4
rahul.nahar001 CreditAttribution: rahul.nahar001 at TATA Consultancy Services for Pfizer, Inc. commentedHi @pontus_nilsson,
I am not able to apply provided patch file. Getting below-mentioned errors.
Thanks
Comment #5
rahul.nahar001 CreditAttribution: rahul.nahar001 at TATA Consultancy Services for Pfizer, Inc. commentedComment #6
rahul.nahar001 CreditAttribution: rahul.nahar001 at TATA Consultancy Services for Pfizer, Inc. commentedHello @pontus_nilsson,
Please find updated Patch.
Comment #7
pontus_nilssonComment #8
renatogThank you very much for contributions @pontus_nilsson and @rahulnahar001.
Comment #10
renatogFixed.
Commited in dev branch.
Thank you very much mans.
Good Work and Good Weekend.
Regards.