I'm trying to implement a validation code email into my website, but when I use the mail() function it doesn't send the email. Of the four parameters (Email, Subject, Message, Headers) I've narrowed it down to being the Message that is causing the issue.
This is my code for the Message:
$EmailMessage = "You've almost finished your Website account registration! Just ensure the following is correct and then click the link below to complete the process. /r/nUsername: " . $User . "/r/nPassword: " . $Password . "/r/nEmail: " . $Email . "/r/nDate of Birth: " . $DOB . "/r/nMailing List: " . $MailListMail . "/r/nComplete Registration: http://www.ThisIsAWebsite.com/validate-account.php?User=" . $User . "&ValCode=" . $ValCode;
Let's say for this context that
$User = 'Username'
$Password = 'Password'
$Email = 'email@email.com'
$DOB = '1/1/1990'
$MailListMail = 'Yes'
$ValCode = 'abcd1234A1'
And the function being used is
mail($Email,'Account Creation',$EmailMessage, 'From:AccountCreation@email.com');
If $EmailMessage is set to "Test" or something similar, the message sends fine.
Can anyone see where I've gone wrong?