If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > PHP > mail function

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-19-10, 03:05
don_log don_log is offline
Registered User
 
Join Date: Jun 2008
Location: pakistan
Posts: 109
mail function

give me the correct statement of sending mail using php mail function is this right or some thing wrong only write correct coding please
my coding is this and now tell me my coding is correct or not
PHP Code:
<?php
$to 
"don_log2003@yahoo.com";
$subject "Test mail";
$message "Hello! This is a simple email message.";
$from "don_log2003@yahoo.com";
$headers "From: $from";
if(
mail($to,$subject,$message,$headers)){
echo 
"Mail Sent.";
}
else
{
echo 
"Mail not send.";
}

?>
Reply With Quote
  #2 (permalink)  
Old 02-19-10, 04:59
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 8,767
what does da manual suggest?
PHP: mail - Manual

PHP: Mail - Manual

there are differences between the *NIX and Windows implementations
I ended up using a mail class, which IIRC came from PHPClasses
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On