Can anyone explain me how to send an e-mail from a web, with php?
In Misc > functions: part2 Stefan Explains a bit the mail function. I try and it doesn't work for me. I get Email sent: 1, but I don't receive the email
- I attached the file: mail1.php:
$did_send = mail('info@mig-marketing.com','Subject','body of the message');
echo "Email sent: " . $did_send;
- I tried something more complex. But I don't receive the email either. mail2.php:
$to = "info@mig-marketing.com";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "narcis@mig-marketing.com";
$headers = "From:" . $from;
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
mail1.php
mail2.php