Body email enter php code

gm gmarra7 09 Aug, 2018
As an object I would like to insert the php code in the body of the email.
Thank you
gm gmarra7 09 Aug, 2018
Is it possible insert a php function through a chrono commands?
he healyhatman 10 Aug, 2018
Use a "Custom Code" element (available under the Basic tab), and set it to "Var only result".
​
You can use php code in it, it will capture all the echo's and everything and can then be included in the body of your email as {var:custom_code_name}
​
Body email enter php code  image 1
Body email enter php code  image 2
gm gmarra7 10 Aug, 2018
Perfect I tried to do the same operation with the php action
but it did not work.
​
Thank you
pa pat01 03 Mar, 2019
Hi
​
I use a multi page form.

In Submit action I need to execute some PHP to get the correct data into email body.
​
In custom code (name: custom_test) I use:[pre]$test = $this->data['name'];
echo $test;[/pre]
​
​
In email body I use:
​
{var:custom_test}
​
But I get no value in email body.
I guess
$this->data['name']
​
is wrong?
[br]
What is the correct way to get this data?
​
Thanks a lot.
he healyhatman 03 Mar, 2019
$this->data("field")
It's a function now, not an array.
pa pat01 03 Mar, 2019
Thanks for the hint. In Multi Page action I now have activated Mix the multi page data with global data:
Body email enter php code  image 3
​
Works now.
This topic is locked and no more replies can be posted.