Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replyto mail not working #6

Open
cemik opened this issue Jan 11, 2022 · 2 comments
Open

replyto mail not working #6

cemik opened this issue Jan 11, 2022 · 2 comments

Comments

@cemik
Copy link

cemik commented Jan 11, 2022

If replyto-field is set it gives error from swiftmailer "Address in mailbox given does not comply with RFC 2822".
Tested on php7.3.17 / wn 1.1.7 and works fine with version 1.5.1 of october-plugin-forms but generates error with 2.0.0 of wn-forms-plugin.

@pierzo
Copy link

pierzo commented Nov 23, 2022

Winter 1.2.1, Magic Forms 2.0.0 PHP. 8.1
Same thing:
Symfony\Component\Mime\Exception\RfcComplianceException: Email "email" does not comply with addr-spec of RFC 2822. in /vendor/symfony/mime/Address.php:54

@cemik
Copy link
Author

cemik commented Nov 23, 2022

You can solve it by changing classes/mails/Notification.php

from:

            // ADD REPLY TO ADDRESS
            if (!empty($this->properties['mail_replyto'])) {
                $message->replyTo($this->properties['mail_replyto']);
            }

to:

            // ADD REPLY TO ADDRESS
            if (!empty($this->properties['mail_replyto']) && !empty($this->post[$this->properties['mail_replyto']])) {
                $message->replyTo($this->post[$this->properties['mail_replyto']]);
            }

josephcrowell referenced this issue in josephcrowell/wn-magicforms-plugin Jul 4, 2023
Fix #6 #10: Replyto not working due to RFC error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants