having some problem regarding"to send the mail through

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
haiderips
Forum Newbie
Posts: 4
Joined: Sat Jun 02, 2007 9:08 am

having some problem regarding"to send the mail through

Post 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]
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post 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?
Post Reply