Hey all just wondering how I, if i can, specify a certain mail server for a form to use when sending email.
Here is my form
www.forbiddenninja.com/forums/form.php
here is the code
<form name="form" method="post" action="action.php">
<p class="bodymd">Clan Leader<br>
<input type="text" name="ClanLeader">
</p>
<p class="bodymd">Clan Tag<br>
<input type="text" name="ClanTag">
</p>
<p class="bodymd">MatchDate<br>
<input type="text" name="MatchDate">
</p>
<p class="bodymd">ServerIP<br>
<input type="text" name="ServerIP">
</p>
<p class="bodymd">Your Email<br>
<input type="text" name="Email">
</p>
<p class="bodymd">Comments or Questions<br>
<textarea name="Comments" rows="5" cols="40"></textarea>
</p>
<p class="bodymd">
<input type="submit" name="Submit" value="Submit">
<input type="reset" name="Reset" value="Clear Form">
</p>
</form>
here is the action.php code
<?php
if (($ClanLeader == "") || ($ClanTag == "") || ($MatchDate == "") || ($ServerIP == "") || ($Email == "") || ($Comments == ""))
{
echo "<form name=form method=post action=action.php>";
echo "<p class=bodymd>All six fields of this form are required, I really don't think that's too much to ask...</p>";
echo "<p class=bodymd>Fill in the ones you missed, they are listed below.</p>";
}
if ($ClanLeader == "")
{
echo "<p class=bodymd>ClanLeader<br><input type=text name=ClanLeader></p>";
}
else
{
echo "<input type=hidden name=ClanLeader value=$ClanLeader>";
}
if ($ClanTag == "")
{
echo "<p class=bodymd>ClanTag<br><input type=text name=ClanTag></p>";
}
else
{
echo "<input type=hidden name=ClanTag value=$ClanTag>";
}
if ($MatchDate == "")
{
echo "<p class=bodymd>MatchDate<br><input type=text name=MatchDate></p>";
}
else
{
echo "<input type=hidden name=MatchDate value=$MatchDate>";
}
if ($ServerIP == "")
{
echo "<p class=bodymd>ServerIP<br><input type=text name=ServerIP></p>";
}
else
{
echo "<input type=hidden name=ServerIP value=$ServerIP>";
}
if ($Email == "")
{
echo "<p class=bodymd>Your Email<br><input type=text name=Email></p>";
}
else
{
echo "<input type=hidden name=Email value=$Email>";
}
if ($Comments == "")
{
echo "<p class=bodymd>Comments or Questions<br><textarea name=Comments rows=5 cols=40></textarea></p>";
}
else
{
echo "<input type=hidden name=Comments value=$Comments>";
}
if (($ClanLeader == "") || ($ClanTag == "") || ($MatchDate == "") || ($ServerIP == "") || ($Email == "") || ($Comments == ""))
{
echo "<input type=submit name=Submit value=Submit>";
echo "<input type=reset name=Reset value=Clear Form>";
echo "</form>";
}
else
{
$message = "ClanLeader: $ClanLeader\nClanTag: $MatchDate\nServerIP: $Email\nComments: $Comments\n";
$extra = "From: $ClanLeader\r\nReply-To: $Email\r\n";
mail ("webmaster@forbiddenninja.com", "Clan Challange", $message, $extra);
echo "<p class=bodymd>Thanks for your inguiry, $ClanLeader.</p>";
echo "<p class=bodymd>A response will be sent to $Email as soon as possible.</p>";
}
?>
it works great except it actually doesnt send email.
I use vbulletin also which is a php built forum. The mail send from the forums through
SMTP = mail.rdc1.md.home.com
this server may change soon, but how do I have my form send using this server,.
Thanks a ton
I am on win2k adv server for an OS
thanks again