How does php code for auto mail be done?

Asked By 10 points N/A Posted on -

I always done sending mail on one by one process. I just want to know some technique and hints on how PHP code for auto mail be done. If you have a video on how to do it, it will be easier for me to do it.

Thank you

Answered By 0 points N/A #164683

How does php code for auto mail be done?



The first argument to this function is the recipient, the second specifies the message's subject and the third one should contain the body. So to send a simple sample message, we could use:
$subject = "Hi!";
$body = "Hi,nnHow are you?";
if (mail($to, $subject, $body)) {
   echo("<p>Message successfully sent!</p>");
  } else {
   echo("<p>Message delivery failed…</p>");
That's it! Note that you can have PHP validate your email addresses for correctness before sending.

Login/Register to Answer

Related Questions