Jump to content

Recommended Posts

Hi, I have this php in use at linked from www.dpsconsultantsurveyors.co.uk/contact.html you press send and it goes through to

 

Warning: mail() [function.mail]: SMTP server response: 554 <info@dpsconsultantsurveyors.co.uk>: Recipient address rejected: Relay access denied in E:\domains\d\dpsconsultantsurveyors.co.uk\user\htdocs\contactpage.php on line 141

We encountered an error sending your mail

 

I have the following php in use and have not altered it:

 

<?PHP

 

 

 

 

$to = "info@dpsconsultantsurveyors.co.uk";

$subject = "dps enquiry";

$email = $_REQUEST['emailaddress'] ;

$message = "First name: ".$_REQUEST['firstname'] ;

$message .= "Surname: ".$_REQUEST['secondname'] ;

$message .= "Phone number: ".$_REQUEST['phonenumber'] ;

$message .= "Address: ".$_REQUEST['address'] ;

$message .= "Address2: ".$_REQUEST['address2'] ;

$message .= "Address3: ".$_REQUEST['address3'] ;

$message .= "Address4: ".$_REQUEST['address4'] ;

$message .= "Nature of enquiry: ".$_REQUEST['enquiry'] ;

$headers = "From: $email";

$sent = mail($to, $subject, $message, $headers) ;

if($sent)

{print ""; }

else

{print "We encountered an error sending your mail"; }

 

 

 

 

?>

 

I've updated the css and rejigged the form a bit but have not touched the contactpage.php php itself?

 

Any one now why this is happening?

 

Thanks,

Link to comment
https://forums.phpfreaks.com/topic/172101-help-my-forms-stopped-working/
Share on other sites

Firstly your mail headers are incomplete.

<?php
$headers  = "MIME-Version: 1.0\n";
$headers .= "Content-type: text/plain;\r\n";
$headers .= "X-Priority: 3\n";
$headers .= "X-MSMail-Priority: Normal\n";
$headers .= "X-Mailer: php\n";
$headers .= "From: \"".$_REQUEST['firstname']." ".$_REQUEST['secondname']."\" <".$email.">\n";
$headers .= "Reply-To: \"".$_REQUEST['firstname']." ".$_REQUEST['secondname']."\" <".$email.">\n";
?>

 

Warning: mail() [function.mail]: SMTP server response: 554 <info@dpsconsultantsurveyors.co.uk>: Recipient address rejected: Relay access denied

 

Do you know what mail relaying is?

Your SMTP mail server is rejecting the email because:

1. The mail server is not responsible for the sender or sending domain or for the recipient or receiving domain.

2. The details of the sender could not be verified.

 

In other words your mail server does not manage this domain: dpsconsultantsurveyors.co.uk

 

Restrictions may have been put in place on your mail server. If this is not your server then your should contact your hosting company. It is not a script issue.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.