I try to send email with a SMTP server. Is it possible to send message with mail() function? Or must i to use PHPMailer or Pear?
$to = "[email protected]";
$subject = "My subject";
$txt = "Hello world!";
$headers = "From: [email protected]" . "\r\n" .
"CC: [email protected]";
mail($to,$subject,$txt,$headers);
Is it possible like:
$headers .= "Host: myhost.example.com\r\n";
$headers .= "User: myusername\r\n";
$headers .= "Password: mypassword\r\n";
? I'm looking for possible simple versions.