[Solved] Send email from php


change $header to $headers, you’ve got $headers = "From: $from\r\n"; and using $header

mail($to, $subject, $message,$headers);

so whole code would look like

<?php 
    //change this to your email. 
    $to = "[email protected]"; 
    $from = "[email protected]"; 
    $subject = "Hello! This is HTML email"; 
    $message = "hello";
    $headers  = "From: $from\r\n"; 
    $headers .= "Content-type: text/html\r\n"; 
    mail($to, $subject, $message,$headers); 

    echo "Message has been sent....!"; 
?>

6

solved Send email from php