Hosting service refusing mail from contact page.

alahuin

No avatar

2008-02-27 23:59

QC v 2x
With help from other members plus a little modification, I have finally managed to get my hosting server to accept and forward mails from the contact page. Here's how:_
Edit core\others.php
Around Line 11 change:-
global $tpl; to global $tpl, $headers;

Look for this line:-

if( checkLength( $sTopic, 2 ) === true && checkLength( $sMailContent, 2 ) === true && checkEmail( $sSender ) == true ){

Change to this:-

if( checkLength( $sTopic, 2 ) === true && checkLength( $sMailContent, 2 ) === true && checkEmail( $sSender ) == true ){
if( !empty( $sTelephone ) )
$sMailContent = $GLOBALS['lang']['Telephone'].': '.$sTelephone."\n".$sMailContent;
if( !empty( $sName ) )
$sMailContent = $GLOBALS['lang']['First_last_name'].': '.$sName."\n".$sMailContent;
if( !empty( $sTopic ) )
$sMailContent = $GLOBALS['lang']['Topic'].': '.$sTopic."\n".$sMailContent;
if( !empty( $sSender ) )
$sMailContent = $GLOBALS['lang']['Your_email'].': '.$sSender."\n".$sMailContent;

$sMailContent = changeCharset( $sMailContent );
$sTopic = changeCharset( $sTopic );

Below find this:-

if( !isset( $sTargetEmail ) )
$sTargetEmail = $GLOBALS['config']['email'];

add this under:-

$headers = "From: you@yourdomain.com\n";
$headers .= "Reply-to: ".$sSender."\n";

» Quick.Cart v2.x

Every truth has two sides. Choose well.

Back to top
about us | contact