hey.............. have got a problem with my php contact form. It will not work. have got a domain email address and have set up a 'forwarder' to my hotmail account. Sure i have missed some thing really simple. Any ideas?
this is where i think i need to do something or have done something wrong. if (SmartyValidate :: is_valid($data, 'contact_form')) { require_once 'libs/phpmailer/class.phpmailer.php'; $mail = new PHPMailer(); $mail->PluginDir = 'libs/phpmailer/'; $mail->Mailer = 'mail'; $mail->From = $data['email']; $mail->FromName = $data['name']; $mail->Subject = $data['reason']; $mail->Body = $data['message']; $mail->AddAddress('szefler@linkdirectorynow.com', 'ben'); if (!$mail->Send()) { $tpl->assign('error', true); } else { $tpl->assign('success', true); } $mail->ClearAddresses(); }
its not so much an error. the code is working but it says the email can't be sent. contact page- click here to see the form i'm sure im forgetting something obvious.
not sure what the problem is, but don't be surprised if the emails don't get forwarded to your hotmail account. I was messing with something similar the other day and hotmail will often block out these forwarded messages unless there is a msn or hotmail address in the from field. not a big deal but you may have to login to webmail to see messages