insert var in email to customer

hu hubert.dyba 11 Sep, 2009
hello

I am using code as below in On Submit code - after sending email

<?php
$from = $replyto_email ="my@mail.com";
$fromname = $replyto_name = "My Name";
$recipient = $_POST['text_8'];
$subject = "my subject";
$html_message = "<p> some text </p>";
$ccemails = $bccemails = $attachments = "";

mosMail($from, $fromname, $recipient, $subject, $html_message, true, $ccemails, $bccemails, $attachments, $replyto_email, $replyto_name );
?>

is it possible to insert a variable in the main body? something like 'Hello text_0 bla bla' so the user will get Hello Mark bla bla??

please help🙂

cheers
HUbert
Gr GreyHead 11 Sep, 2009
Hi Hubert,

That looks like code from the Joomla 1.0 version of ChronoForms?

If you use the ChronoForms Email template then you can use {field_name}. If you are using your own code - as you appear to be - then you can use a string replace on the $html_message to insert something.

Bob
hu hubert.dyba 11 Sep, 2009
thanks for reply🙂

string replace.. is it easy enough for you to write me down what excatly do I have to paste to my code? or is it more time-taking?😉 my php skills are next to nothing😉

cheers
Hubert
This topic is locked and no more replies can be posted.