Elementor Forms API - Set different headers for Email 1 and Email 2 #27363
MJNinja
announced in
Developers Community
Replies: 1 comment
-
I would like to add a similar option for file attachments. When I create file uploads in a form with the Send Files option 'Email with attachment' or 'Email with both', files will be attachted to the Email (as expected). But when I want to add a confirmation mail (Email2), the attachments are also added to the confirmation mail. This is undesirable behavior. Please add an option where file attachments can be disabled for Email2 (confirmation mails). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Prerequisites
Description
I am currently trying to dynamically add CC email addresses to an Elementor form's email through the WordPress functions.php file. My client wants me to only add the CC email addresses when a specific value from a drop down / select field is selected. I've managed to get it to work but now it adds those CC email addresses to both emails.
I use the Elementor Form Actions After Submit Emails in the following ways:
Here is the code:
Is there a way for me to set the headers based on the email that is being send. I only need the CC email addresses added to Email 1 (the one that gets send to the website owner) and not Email 2. The information on the developer docs (https://developers.elementor.com/docs/hooks/forms/) don't mention anything about it.
Steps to reproduce
Expected behavior
I would like to be able to easily check which Elementor form email is being send and then apply the needed headers to it through PHP and the available hooks. Maybe some sort of email_type check which I can grab from the Form_Record.
Example:
Isolating the problem
Elementor System Info
Click to reveal
Agreement
Beta Was this translation helpful? Give feedback.
All reactions