recneps13 Posted January 26, 2009 Share Posted January 26, 2009 Hi, I have a simple contact form on my website, this is the code in the contact_send.php page <?php session_start(); $rcpt = "[email protected]"; $subject = "Workplace Cleaning Solutions - Online Enquiry"; $message = "Workplace Cleaning Solutions - Enquiry form\n"; $host = "intmail.mailserver.com"; $username = "[email protected]"; $password = "workplace210909"; $message .= "-----------------------------------------------------------------------\n"; $message .= "Name: ".$_POST['name']."\n"; $message .= "-----------------------------------------------------------------------\n"; $message .= "Email: ".$_POST['email']."\n"; $message .= "-----------------------------------------------------------------------\n"; $message .= "Phone number: ".$_POST['phone']."\n"; $message .= "-----------------------------------------------------------------------\n"; $message .= "County: ".$_POST['county']."\n"; $message .= "-----------------------------------------------------------------------\n"; $message .= "Address: ".$_POST['address']."\n"; $message .= "-----------------------------------------------------------------------\n"; $message .= "Enquiry: ".$_POST['enquiry']."\n"; $message .= "\n"; mail($rcpt, $subject, $message, "From: ".$_POST['email'].""); header ("Location: contact_thanks.php"); exit; ?> I have added this code into the php form and this is supposed to authenticate the SMTP on WebFusions web server so the form can be sent but I get the below error?? $host = "intmail.mailserver.com"; $username = "[email protected]"; $password = "workplace999999"; Warning: mail() [function.mail]: SMTP server response: 550 You must use Authenticated SMTP to relay email from ATLAS Can you help please??? You can see the error when submitting the form below: http://www.workplace-cleaningsolutions.com/dev/home/contact_us.php Thanks, Recneps Link to comment https://forums.phpfreaks.com/topic/142468-php-form-error-warning-mail-functionmail-smtp-server-response-550-you/ Share on other sites More sharing options...
PFMaBiSmAd Posted January 26, 2009 Share Posted January 26, 2009 The php mail() function does not support SMTP authentication. It does not have any place that accepts your $username and $password variables. You need to use one of the phpmailer classes. Link to comment https://forums.phpfreaks.com/topic/142468-php-form-error-warning-mail-functionmail-smtp-server-response-550-you/#findComment-746534 Share on other sites More sharing options...
recneps13 Posted January 26, 2009 Author Share Posted January 26, 2009 Hi, Thanks for the response do you have any examples or know where to go to see examples that I can use?? Cheers Link to comment https://forums.phpfreaks.com/topic/142468-php-form-error-warning-mail-functionmail-smtp-server-response-550-you/#findComment-746541 Share on other sites More sharing options...
PFMaBiSmAd Posted January 26, 2009 Share Posted January 26, 2009 http://phpmailer.codeworxtech.com/index.php Link to comment https://forums.phpfreaks.com/topic/142468-php-form-error-warning-mail-functionmail-smtp-server-response-550-you/#findComment-746582 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.