Forward module compat

Created on 27 March 2023, about 2 years ago

Problem/Motivation

Forward module not work since used symfony_mailer

Steps to reproduce

- Install symfony_mailer
- Install forward
Error on forward:
Symfony\Component\Mime\Exception\InvalidArgumentException : An address can be an instance of Address or a string ("null" given). dans Symfony\Component\Mime\Address::create() (ligne 103 de /home/web/cc-gorgesardeche.fr/www/vendor/symfony/mime/Address.php).

Proposed resolution

Add a back compat

Remaining tasks

- Create import with customization of sender, subject and body

✨ Feature request
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡«πŸ‡·France netsliver Chelles

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

Merge Requests

Comments & Activities

  • Issue created by @netsliver
  • πŸ‡¬πŸ‡§United Kingdom adamps

    Thanks for the issue and patch.

    Every EmailBuilder in this module is as a good example of the best way (in my opinionπŸ˜ƒ) to write code for this module.

    I looked at the code for forward module. It's interesting, almost everything in ForwardForm.php could be replaced by features of this module. ForwardEmailBuilder would call EmailInterface::setBodyEntity(). Almost everything else can be handled with Mailer Policy: the header, footer, the alter hooks, the from and reply-to addresses, the setting for plain text mode, etc. This would be something for the module maintainers to decide, and it could come with a new major version release. Probably they would wait a bit - if this module later gets 20000 sites using it then that makes the difference.

    If we're not going to do that, then it's best not to have an EmailBuilder, because creating one blocks the useful features of LegacyEmailBuilder, especially calling hook_mail_alter(). It looks like there is just one address field that is NULL. This can be fixed in the forward module, probably it just takes an if statement to avoid setting the header to a NULL value.

  • Status changed to Active almost 2 years ago
  • πŸ‡¬πŸ‡§United Kingdom adamps

    I think this belongs in the forward module for the maintainers to decide how to go forward

  • First commit to issue fork.
  • πŸ‡ΊπŸ‡ΈUnited States scottsawyer Atlanta

    Uploading patch for convenience. Minimal testing was done. Hopefully this is a good approach.

Production build 0.71.5 2024