PHP Mail Sender

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
AliJ
Forum Commoner
Posts: 32
Joined: Sun Dec 06, 2009 8:03 pm

PHP Mail Sender

Post by AliJ »

Hi,

I have created this PHP mail sender but it does not seem to work.Look at the code.

Code: Select all

<?php
$to = "email@example.com"; // To anyone. Real email obviously.
$subject = "Subject";
$message = "Message";
$from = "any@email.com"; //This can be any email. You don't need any real email.
$headers = "From: $from";
mail($to,$subject,$message,$headers);
echo "Mail Sent."; // If the mail is sent it will show this.
?>
I get the "Mail Sent" but I don't receive an email.
I would appreciate some help.
Thank you,

Ali J
AliJ
Forum Commoner
Posts: 32
Joined: Sun Dec 06, 2009 8:03 pm

Re: PHP Mail Sender

Post by AliJ »

Please, even try it out your self. Send an email to your email.
Post Reply