Jump to content

mailing function not working...


Derleek

Recommended Posts

So i can't figure out why this isn't working...

 

<?php
$to = "[email protected]";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
if (mail($to, $subject, $body)) {
  echo("<p>Message successfully sent!</p>");
} else {
  echo("<p>Message delivery failed...</p>");
}
?>

 

Now, i had this working several days ago and it mysteriously stopped... i don't know what it could be.

 

any idea's?

Link to comment
https://forums.phpfreaks.com/topic/117437-mailing-function-not-working/
Share on other sites

Hiya,

I'm just guessing, but maybe try this:

 

<?php
$to = "[email protected]";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
$mai=main($to,$subject,$body);
if ($mai) {
  echo("<p>Message successfully sent!</p>");
} else {
  echo("<p>Message delivery failed...</p>");
}
?>

 

I don't expect it to work, but it might. :D

 

Best Regards,

En-Psyche Management

<?php
$to = "[email protected]";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
$mai=mail($to,$subject,$body);
if ($mai) {
  echo("<p>Message successfully sent!</p>");
} else {
  echo("<p>Message delivery failed...</p>");
}
?>

Forgot to put "mail" instead of "main". Ha ha. :D

 

Best Regards,

En-Psyche Management

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.