Page 1 of 1

email sender undefined

PostPosted: Wed Oct 17, 2012 9:01 am
by jaz26j
Hello,

I am having a small problem with my mailer.php, it seems like it does not want to recognize the senders through the website contact form but i have other contact form on other servers and they work perfectly with the same codes.

here is the code and a sample picture of the problem...

<?php


// read the variables form the string, (this is not needed with some servers).
$subject = $_REQUEST["subject"];
$message = $_REQUEST["message"];
$sender = $_REQUEST["sender"];


// include sender IP in the message.
$full_message = $_SERVER['REMOTE_ADDR'] . "\n\n" . $message;
$message= $full_message;

// remove the backslashes that normally appears when entering " or '
$message = stripslashes($message);
$subject = stripslashes($subject);
$sender = stripslashes($sender);

// add a prefix in the subject line so that you know the email was sent by online form
$subject = "Contact form ". $subject;

// send the email, make sure you replace email@yourserver.com with your email address
if(isset($message) and isset($subject) and isset($sender)){
mail("jg@binary3.net", $subject, $message, "From: $sender");
}
?>


Image



Can anyone help regarding that issue.

Greatly appreciated,

Jasmin

Re: email sender undefined

PostPosted: Fri Oct 19, 2012 11:49 am
by vick
Hello,

Thanks for contacting us with your issue. However, it is difficult for us to solve this issue in forum as it might be related to coding. It will be better if you open a ticket to us at support@canadianwebhosting.com so that we can check it in detail and provide you with a better solution.

Thanks,
Vick

Re: email sender undefined

PostPosted: Fri Oct 19, 2012 2:33 pm
by felicelam
Don't forget that you can also reach us via social media on Twitter and Facebook anytime.

Twitter: https://twitter.com/cawebhosting
Facebook: https://www.facebook.com/canadianwebhosting