When a person submits an application through the form wpbroadbean
supplies, the “From” address that gets sent back over to broadbean is
based off of the server default address, and not the applicants.
This should not be the case. As you can see here:
https://github.com/highrisedigital/wpbroadbean/blob/master/functions/application-form.php#L328
The plugin sets the from name and email address to that applied by the applicant. Sometimes if you are using a plugin to stop WordPress sending email through wp_mail() this can be the problem – or certainly where to start.
Hi Mark,
Thanks for confirming that it wasnt the plugin doing this, it turns out it is an issue with the host Freshsites masking any “from” outgoing phpmail from their server.
We will have to use SMTP within wordpress to send emails correctly, and this has to be set to only one single address for the “from” field.
Is it possible to set up a “reply to” field for the broadbean plugin, when sending header information across from wordpress to broadbean?
So it would be:
From: [email protected] (always the same)
Reply to: [email protected] (different per applicant) ?
Great stuff, is this something i would add into a functions file, or would i be have to edit the plugin files directly?
You would need to write a function (yes you could put this in your theme functions.php although it would be better in a plugin) which filters the data in that header using the filter name outlined in the link above.
Take a look at actions and filters if you are not sure about using them:
https://codex.ww.wp.xz.cn/Plugin_API#Filters
You should never modify the plugin code. This is because when the plugin gets updated the changes would be overwritten.
I touch briefly here on plugin extensibility using filters and actions:
Thanks for that Mark, im aware that I shouldnt edit the main plugin files, but im not too up to date with Filters and Action.
Do you have an example? I was hoping it would be a simple addition to switch the “from” field to a “reply to” field.
Ideally I would have the “from” field defined as something
And then the “reply to” field as the applicants email address