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 = "somebody@example.com";
$subject = "My subject";
$txt = "Hello world!";
$headers = "From: webmaster@example.com" . "\r\n" .
"CC: somebodyelse@example.com";
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.