Hello @bakhshi
The demo in the post you are referring uses the wp_mail function of WordPress. You can read the documentation of this function visiting the following link:
https://developer.ww.wp.xz.cn/reference/functions/wp_mail/
Please, pay attention to the headers section (and the examples) in the documentation of the wp_mail function.
Note this function is not part of our plugin, it is a function of WordPress core.
Best regards.
I added a header to the code but it doesn’t work!
What did I do wrong?
$GLOBALS['SERVER_SIDE_EQUATIONS']['sendmail'] = function($firstname, $lastname, $City, $headers){
$firstname = sanitize_text_field($firstname);
$lastname = sanitize_text_field($lastname);
$City = sanitize_text_field($City);
if(
!empty($firstname) &&
!empty($lastname) &&
!empty($City)
)
{
$message = "
نام: $firstname
تلفن: $lastname
شهر: $City ";
$headers = 'VentCal';
return wp_mail("[email protected],[email protected]", "اطلاعات بازدیدکنندگان", $message, $headers);
}
return false;
};
it fixed
I changed this part
$headers = "From: Site name <[email protected]>" . "\r\n";
-
This reply was modified 6 years, 1 month ago by
Bakhshi.
Hello @bakhshi
The header is an array with the definition of email headers, one of them the “From” header. Please, look the users examples in the following link:
https://developer.ww.wp.xz.cn/reference/functions/wp_mail/#user-contributed-notes
I’m sorry, but this question is not about our plugin, you are asking support for functions in the core of WordPress. If you need a custom coding service, do not hesitate in contact us through our website: Customization
Best regards.
Hello
when I unticked the checkbox: “Eval dynamically the equations associated to the calculated fields” in the form settings
Information was not sent to my email!
That means it doesn’t work
Is there another solution to this situation?
Hello @bakhshi
If you don’t want to eval the equations dynamically, you must to insert a button in the form to evaluate them:
* Insert a button field in the form, and tick the “Calculate” option as the button’s type in its settings.
Best regards.