Jump to content

PHP form error - Warning: mail() [function.mail]: SMTP server response: 550 You


recneps13

Recommended Posts

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

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.