My mail does not work is there anything wrong with my code i missed? function sendHTMLmail($fromid,$to,$subject,$message) { include_once("mailer.php"); $mail = new PHPMailer(); $mail->IsMail(); $mail->Host = "localhost"; // SMTP servers $mail->From = $fromid; $mail->FromName = $fromid; $mail->IsHTML(true); $mail->AddAddress($to,$to); $mail->Subject = $subject; $mail->Body = $message; $mail->AltBody = "Please enable HTML to read this"; $mail->Send(); PHP:
Are you using the PHP Mailer script? What error do you get? If it isnt working I would suggest commenting out that entire block and using PHP's Mail and not mailer.php. If that works then slowly start introducing mailer.php and its features until you find out where it falls over
Code looks good. Post mailer.php Also I would add some security to this before going live. Prevent the spammers from hijacking your mailer. Classic case would be to add bcc headers or to replace the to/from etc etc. Also add in a dnsbl check to block them right from go.