fails to send outlook mail through localhost xampp

  outlook, php, sendmail, xampp

This issue might have been asked thousands of times however I’ve really searches online and
set up all required config , php mail() function obviously returns false

here’s my config
—-php.ini—-

[mail function]
SMTP=smtp-mail.outlook.com
smtp_port=587
sendmail_from = a*****@outlook.com
sendmail_path = "C:xamppsendmailsendmail.exe -t"

—- sendmail.ini ——

[sendmail]
smtp_server=smtp-mail.outlook.com
smtp_port=587
error_logfile=error.log
debug_logfile=debug.log
auth_username=a*****@outlook.com
auth_password= **********
force_sender=a*****@outlook.com
auto = use SSL for port 465, otherwise try to use TLS

and my php code

 $to      =  $user_email ;
    $subject = 'Congrats , You have signed Up to Attend'.$row['event_title'].' Event hosted by YZU';
    $message = 'Dear '. displayUserProfile($user_id, 'get_name'). ' We are happy to have you among the invited attendance'. "rn";
    $message .= 'Please be aware of the following'."rn";
    $message .= 'Your Invitation ID is '.$seatID . "rn";
    $message .= 'Events starts ' . $row['e_starts'] . "rn";
    $message .= 'Events ends ' . $row['e_ends'] . "rn";
    $message .= 'Events location ' . $row['location'] . "rn";
    $message .= 'Current Attendance ' . $row['current_attendance'] . "rn";
    $message .= 'Remaining seats ' . ($row['max_attendance'] - $row['current_attendance']) . "rn";
    $headers = 'From: [email protected]'       . "rn" .
        'X-Mailer: PHP/' . phpversion();

    if(mail($to, $subject, $message, $headers)){
        return $message;
    }
    return false ;

I checked error.log file the following is thrown

21/05/05 06:13:39 : STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied; Failed to process message due to a permanent exception with message Cannot submit message. 0.35250:0C040000, 1.36674:0A000000, 1.61250:00000000, 1.45378:02000000, 1.44866:55020000, 1.36674:0E000000, 1.61250:00000000, 1.45378:5A020000, 1.44866:4E010000, 16.55847:0E040000, 17.43559:0000000024020000000000000000000000000000, 20.52176:140F0C9019004010F1030000, 20.50032:140F0C9089174010F1030000, 0.35180:00000000, 255.23226:00000000, 255.27962:0A000000, 255.27962:0E000000, 255.31418:0A000000, 0.35250:00000000, 1.36674:0A000000, 1.61250:00000000, 1.45378:02000000, 1.44866:A4000000, 1.36674:32000000, 1.61250:00000000, 1.45378:A9000000, 1.44866:01000000, 16.55847:10010000, 17.43559:0000000078030000000000000000000000000000, 20.52176:140F0C90190070204800D13D, 20.50032:140F0C908917F01F57000000, 0.35180:0A000000, 255.23226:0A001F0E, 255.27962:0A000000, 255.27962:32000000, 255.17082:DC040000, 0.27745:02000000, 4.21921:DC040000, 255.27962:FA000000, 255.1494:00000000, 0.38698:77090000, 0.37692:01000000, 0.37948:70610100, 5.33852:00000000534D545000010480, 7.36354:010000000000010900000000, 4.56248:DC040000, 7.40748:010000000000010B38364D42, 7.57132:0000000000000000352D6462, 1.63016:32000000, 4.39640:DC040000, 8.45434:FDBF0300C50E181F00000000000000007D6FEFDD, 1.46798:04000000, 5.10786:0000000031352E32302E343130382E3032353A4F5333503238364D42313032383A30313230356137352D646236302D343663352D393536312D6338633533663735353636623A353439333600, 7.51330:47E924DE490FD90818000000, 0.39570:00000000, 1.55954:0A000000, 0.49266:02000000, 1.33010:0A000000, 2.54258:00000000, 0.40002:7A000000, 1.56562:00000000, 1.64146:32000000, 1.33010:32000000, 2.54258:DC040000, 255.1750:0A009510, 255.31418:B0000000, 0.22753:0A005636, 255.21817:DC040000, 0.64418:B5000000, 4.39842:DC040000, 0.41586:0A009610, 4.60547:DC040000, 0.21966:03003866, 4.30158:DC040000 [Hostname=OS3P286MB1028.JPNP286.PROD.OUTLOOK.COM]<EOL>

and some crash.text file is been created in the same directory as sendmail.ini
I wonder if that is something has to do with my config , and i really would appreciate a help here .

Source: Ask PHP

LEAVE A COMMENT