Something wrong with my codes?
<?php
 $rand_2 = "abcdefghijklmnopqeABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
 $rand_key = substr(str_shuffle($rand_2), 0, 30);
 $to = "meanlinsey@gmail.com";
 $subject = "Account Validation";
 $body = "Good Day! "."Mary Ann Linsey"."\n\n Copy this validation code below to 
 confirm your registration in Portal \n\n".$rand_key;
 $header = "From: Portal";
if(mail($to, $subject, $body, $header)){
    echo 'Message has been sent to: <strong>'.$to.'</strong>';
}else{
    echo 'something went wrong';
}
?>
some of my send email program is working this piece of codes is not I dont why I already configure the php.ini and send_mail.ini.
 
    