I can't get my mail function to work in the slightest. Can someone help me out? I create a php file with this code and it doesn't send an email. It doesn't do anything except echo sending mail...🙁

I'll also include the php.ini mail function snipet.

<?php
$recipient = "jamest@msivt.com";
$subject = "Testing";
$message = "Hello!";
$extra = "From: [email]jamest@msivt.com[/email]\r\nReply-To: [email]jamest@msivt.com[/email]\r\n";

mail ($recipient, $subject, $message, $extra);

echo "Sending mail...";

?>

**********php.ini**************
[mail function]
; For Win32 only.
SMTP = smtp.hypermart.net
smtp_port = 25

; For Win32 only.
sendmail_from = jamest@msivt.com


    if you are trying to send mail through smtp.hypermart, you may have to uncomment your username
    For Win32 only.
    ;sendmail_from = jamest@msivt.com

    by removing the ";"

      ahhh, I alread did that actually. After I posted, I found something that said remove the comment, but it still doesn't work. Any ideas?

      The tricky thing is that I don't get an error at all. The page just refreshes like it is executing all of the code. My thought is that it might be getting lost out there somewhere in cyberspace or something. Any possible answers would be much appreciated

        in your code you are not really controlling if the email is really got sent!

        if (mail(......))
        { 
            print "OK";
        }
        else
        {
            print "ERROR";
        }
        

        cu
        chris

          Write a Reply...