This is my code:
$to = 'info@example.de';
$subject = 'Test Subject';
$data = "". echo (rand(12448, 13451)); ."";
$headers = "From: " . strip_tags($_POST['req-email']) . "\r\n";
$headers .= "Reply-To: ". strip_tags($_POST['req-email']) . "\r\n";
$headers .= "Content-Type: text/html;";
$message = '<html>';
$message .= '<td style="color:#ffffff;font-family:Arial,sans-serif;font-size:28px;line-height:36px;text-align:left">'. $data .'</td>';
$message .= '<&/html>';
if(mail($to, $subject, $message, $headers)){
echo 'Your mail has been sent successfully.';
} else {
echo 'Unable to send email. Please try again.';
}
I don't get the $data
to display right in the HTML E-Mail output.
I need help guys and would be thankful if you help me out here to display the php string in the HTML E-Mail.