hi I am just wondering how I can test the mail( ) fucntion on my local host without any email program. Is it possible?

Basically here is the code that I used(firefox shows the error message: Firefox doesn't know how to open this address because the protocol (c) isn't associated with any program:

<title>Bob's Auto Parts - Customer Feedback</title>

<h1>Customer Feedback</h1>

<p>Please tell us what you think.</p>

<form method=post action="c:/Program Files/Apache Software Foundation/Apache2.2/htdocs/processfeedback.php">
Your name: <br />
<input type=text name="name" size=40><br />
Your email address: <br />
<input type=text name="email" size=40><br />
Your feedback:<br />
<textarea name="feedback" rows=5 cols=30>
</textarea><br />
<input type=submit value="Send feedback">

and this is hte code to process this comment:

//create short variable names

$toaddress = 'kunqian@live.ca';
$subject = 'Feedback from web site';
$mailcontent = 'Customer name: '.$name."\n"
.'Customer email: '.$email."\n"
."Customer comments: \n".$feedback."\n";
$fromaddress = 'From: webserver@example.com';

mail($toaddress, $subject, $mailcontent, $fromaddress);
<title>Bob's Auto Parts - Feedback Submitted</title>
<h1>Feedback submitted</h1>
<p>Your feedback has been sent.</p>


any help would be appreciated

10 Years
Discussion Span
Last Post by architact

You cannot send email from your localhost, you will need a testing server who supports mail function like, www.111mb.net, they will offer you 400mb space without any charges you can test your mail function there. you Just need to create an account on that site.


I don't have any link with www.111mb.net, just told you for the sake of help :)

thanks for the reply!

do you know any other way i could test it?


I think that's the only way.

what is the reason behind that?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.