Hi all!
Currently have a script that uses the following snippet of code to send an email to a successfully registered user:
..............
$to = $email;
$subject = 'System Registration Details';
$body = 'Dear'.$firstname.' '.$surname.',\n You have successfully registered on the System.\n\n Your logon details are unique and you should keep them confidential and recorded, as you will need them to log onto the system at any time.\n\n Your username is: '.$username.' and your password is '.$password.', and the input you gave for your Mother\'s maiden name is: '.$maidenname.'.\n\n Many thanks and enjoy using the system.';
if (mail($to, $subject, $body)) {
echo("<p>Message successfully sent!</p>");
}
else {
echo("<p>Message delivery failed...</p>");
}
...................
I have configured my php.ini fine, the email is being sent out to the user from the required address etc. My problem is the layout of the body of text. I cannot seem to create spaces, line breaks etc. on the email that is sent out, the text just contains the html tags in one lump paragraph.
Does anyone know how you can format the layout of the body of the text properly within the sent email?