Jump to content

php mail()


Recommended Posts

I just now tried this on my site and it worked just fine:

 

<?php
$tomail = "your-addy@yahoo.com";
$frommail = "anybody@yahoo.com";
$subject = "Test Email";
$message = "This is a test.";

mail($tomail, $subject, $message, "From: $frommail");
echo "The email has been sent.";
?>

 

Make sure you check your spam folder.

 

Byron

 

 

Link to comment
Share on other sites

Tell us which email account you using?

 

I'm currently using yahoo, by adding stevie.heliohost.org into trusted list.

My hotmail used to receive mail too, but not now.

Problem : unknown

Link to comment
Share on other sites

I'm using a gmail account for the receiving address. Will certain mail accounts not receive properly?

This is the code i used to test the mail function:

 

<?php

$sendto = "myemail@gmail.com";
$subject = "Subject";
$from = "nobody@nowhere.edu";
$headers = 'From: '.$from."\r\n".'Reply-To: '.$from."\r\n";
$body = "This will work. I insist upon it. \r\n";
mail( $sendto, $subject, $body, $headers );

echo "it worked";

?>

Link to comment
Share on other sites

Like Byron said, check your Spam folder.

I'm not sure about gmail since i'm not using it.

Add stevie.heliohost.org into trusted list as I do in yahoo mail.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...