2012-04-17, 00:15:37
The website is hosted with whois.com. They explicitly need the From email address to be of the site hosted at their server. I have changed the Get-Simple admin email and p01-contact default email ids to the email ids of the site hosted on their server but no luck. I still get the "Email not sent" error.
Is there any way I can add the from email id explicitly inside the p01-contact plugin code?
Whois.com support staff has sent me this script which automatically sends an email on execution but it does not have a user filled form associated to it. How can I build a contact form around it?
<?
$mailto="andy.prakash@gmail.com";
$file="thanks.htm";
$pcount=0;
$gcount=0;
$subject = "Test Mail from Enquiry Form";
$from="somebody@woodruff.in";
while (list($key,$val)=each($_POST))
{
$pstr = $pstr."$key : $val \n ";
++$pcount;
}
while (list($key,$val)=each($_GET))
{
$gstr = $gstr."$key : $val \n ";
++$gcount;
}
if ($pcount > $gcount)
{
$message_body=$pstr;
mail($mailto,$subject,$message_body,"From:".$from);
include("$file");
}
else
{
$message_body=$gstr;
mail($mailto,$subject,$message_body,"From:".$from);
echo "Mail sent";
}
?>
Is there any way I can add the from email id explicitly inside the p01-contact plugin code?
Whois.com support staff has sent me this script which automatically sends an email on execution but it does not have a user filled form associated to it. How can I build a contact form around it?
<?
$mailto="andy.prakash@gmail.com";
$file="thanks.htm";
$pcount=0;
$gcount=0;
$subject = "Test Mail from Enquiry Form";
$from="somebody@woodruff.in";
while (list($key,$val)=each($_POST))
{
$pstr = $pstr."$key : $val \n ";
++$pcount;
}
while (list($key,$val)=each($_GET))
{
$gstr = $gstr."$key : $val \n ";
++$gcount;
}
if ($pcount > $gcount)
{
$message_body=$pstr;
mail($mailto,$subject,$message_body,"From:".$from);
include("$file");
}
else
{
$message_body=$gstr;
mail($mailto,$subject,$message_body,"From:".$from);
echo "Mail sent";
}
?>