Start New Discussion within our Web Development Community

hi i was trying the following to invite the list of contacts from gmail.

$email = '';
$sender = '';
$send = mail($email, "Invitation", "Testing e-mail", "From: $sender");
echo $send;
<form action='inviteList.php' method='post'>
<font>Invite your friends</font><br><br>
<font><b>Email: </b> <input type='text' name='email' size='30'><br>
<input type='submit' value='Invite' name="submit">

but i got the following error:
Warning: mail() [<a href='function.mail'>function.mail</a>]: Failed to connect to mailserver at &quot;localhost&quot; port 25, verify your &quot;SMTP&quot; and &quot;smtp_port&quot; setting in php.ini or use ini_set() in D:\wamp\www\invite\inviteList.php on line 9

This article has been dead for over six months. Start a new discussion instead.