Page 1 of 1

having some problem regarding"to send the mail through

Posted: Mon Jun 11, 2007 10:08 am
by haiderips
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


hello friends , 
 i am trying to send  mail through php  , but having some problem 
 my code is 
PHP:

Code: Select all

<?php

$to      = 'haider.athar@gmail.com';
$subject = 'the subject'. "\r\n";
$message = 'hello'. "\r\n";
$headers = 'From: haider.athar@gmail.com' . "\r\n" ;
    

$result=mail($to, $subject, $message, $headers);
	if($result)
		echo('mail successfully delivered');
		else
		echo('mail could not be  delivered'); 
		

?>
after executing it on IIS Web Server, i am getting the result "mail successfully delivered", and mail should be stored in C:\Inetpub\mailroot\Mailbox. but there is no mail ,

so to visible my mail in desired folder what i should do,
please try to solve my problem


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Mon Jun 11, 2007 10:32 am
by volka
mail()==true doesn't mean "mail delivered" but "mta/smtp server accepted the mail". There's a difference.
haiderips wrote:nd mail should be stored in C:\Inetpub\mailroot\Mailbox
I have no idea how the smtp server of the IIS works but exactly what did you do to make it store mails for haider.athar@gmail.com in C:\Inetpub\mailroot\Mailbox?