email sender undefined

email sender undefined

Postby jaz26j » Wed Oct 17, 2012 9:01 am

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
jaz26j
 
Posts: 1
Joined: Wed Oct 17, 2012 8:48 am

Re: email sender undefined

Postby vick » Fri Oct 19, 2012 11:49 am

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
vick
 
Posts: 5
Joined: Tue Jul 24, 2012 1:37 pm

Re: email sender undefined

Postby felicelam » Fri Oct 19, 2012 2:33 pm

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
felicelam
 
Posts: 177
Joined: Mon May 16, 2011 4:24 pm


Return to Email

Who is online

Users browsing this forum: No registered users and 0 guests

cron