Good day,
i was experimenting on using this custom php syntax that i was hoping it would be sent instead of the contents from Register.en-US.php. upon trying, i think the default Register.en-US.php was fired instead of this custom php syntax i placed in email_sending.
function Email_Sending($email, $args)
{
if ($email->EventName == "Register") {
$content = "<p>Dear " . $args["rs"]["name"] . ",</p>";
$content .= "<p>Thank you for registering. Your information is as follows:</p>";
// Loop over form fields and get display values
foreach ($this->Fields as $fieldName => $fld) {
if (array_key_exists($fieldName, $args["rs"])) {
$caption = $fld->caption(); // Label shown on form
$displayValue = $fld->ViewValue; // Form display (caption/format)
$content .= "<p><strong>$caption</strong>: $displayValue</p>";
}
}
if (!empty($args["ActivateLink"])) {
$content .= "<p>Please click the following link to activate your account:<br>";
$content .= '<a href="' . $args["ActivateLink"] . '">Activate account</a></p>';
}
$content .= "<p>Best Regards,<br>Support</p>";
$email->Content = $content;
}
return true;
}