Closed kombimedia closed 2 years ago
Please go to the backend Settings -> Event Log. There should be error record. Copy and paste error message and stack trace.
In new version to_email
and to_name
field are replaced with repeater recipients
field.
I think you can remove this boot method and use Autoresponder feature, where you can specify which fields to use and even the mail template.
If you want to use boot
method to change recipients than this is the code to use now:
\Event::listen('formBuilder.beforeSendMessage', function ($form, $data) {
$form->recipients = [
[
'email' => $data['recipient_email'],
'recipient_name' => $data['recipient_name'],
]
];
});
Hi @mplodowski,
Thanks for your speedy response.
There was no event logged for this error.
Thanks also for the updated boot
method snippet. Because the email recipient will always need to be dynamically injected I have gone for this method to override the default recipient, preventing two emails being sent.
Cheers
Without seeing error message there is very limited way to help you.
The only way to see this error is to enable APP_DEBUG = true in .env file.
You can also run: composer update
in project root.
The last resort should be reinstalling plugin, but can cause data loss.
@mplodowski,
Sorry, I wasn't clear. I'm not receiving the error anymore. I have updated my boot
method to the one you provided, and removed un-required recipient repeaters that had been generated after upgrading to 2.1.0. I think the error i was receiving was due to a 'new recipient' not having an email address defined.
Thanks
Super! I am glad it works now.
Describe the bug I have updated to the latest version of the plugin 2.1.0 and run the database patch. Now when a form is submitted an alert window pops up with a 'something went wrong' message.
To Reproduce Steps to reproduce the behavior:
Expected behavior I expected the form to submit
Screenshots![Screen Shot 2021-11-22 at 15 24 29](https://user-images.githubusercontent.com/28551935/142794794-ad3dd8a5-47c1-40da-9522-260970f1bb54.png)
October version 2.1.21
Plugin version 2.1.0
Additional Details I am extending the FormBuilder plugin to dynamically set the recipient name and email before the message is sent.
Hope you can help.
Cy