Jump to content

PHP Mail


TheUkSniper

Recommended Posts

The 550 error generally means that relaying is not permitted (despite what the actual 'text' part of the error states) and that you are not satisfying the relaying restrictions setup on your sending mail server.

 

A) You should check what requirements your new host has concerning relaying (generally either the To: email address must be hosted on the sending mail server or the From: email address must be hosted on the sending mail server to satisfy relaying restrictions) and/or using SMTP authentication,

 

B) For us to be able to help, we would need to know what requirements your host has and what your script is doing.

Link to comment
Share on other sites

Hello,

 

The error I'm getting is coming from the remote mail client. Services like hotmail are recieving the mail but one company that I have to send emails too is not (even though it was before).

 

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

  xxxxxxxxxxxx@dcleisure.co.uk
    SMTP error from remote mail server after end of data:
    host mail.dcleisure.co.uk [195.224.182.114]: 550 This message is spam and is rejected.

 

Code I am using is as follows;

 

// subject
$subject = 'iSwim Registration';

// message
$message = '
<html>
<head>
<title>iSwim Registration</title>
<style type="text/css">
<!--
body {font-family: Verdana, Arial, Helvetica, sans-serif}
.style1 {font-weight: bold}
.style2 {color: #0089CE}
-->
</style>
</head>
<body>
  <p align="left" class="style1"><img src="http://www.wolvesstaff.co.uk/iswim/images/iswimheader.png" width="536" height="124"></p>
  <h3 class="style2">Your registration to iSwim is now complete!</h3>
  <p>Your temporary password is: Blah</p>
  <p>Once you have logged in, you can change this password to something more memorable!<br>
  We look forward to seeing you online soon!</p>
  <p><span class="style1">iSwim Administration Team</span><br>
      </p>
</body>
</html>
';

// To send HTML mail, the Content-type header must be set
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset="iso-8859-1"' . "\r\n";

// Additional headers
$headers .= 'To: xxxxxxxxxxxx@hotmail.com, xxxxxxxxxxxxx@dcleisure.co.uk' . "\r\n";
$headers .= 'From: iSwim Robot <iSwim@wolvesstaff.co.uk>' . "\r\n";

// Mail it
$sendMail = @mail($to, $subject, $message, $headers);

 

The headers with the To: email address obviously have been changed for testing purposes, this would usually be a variable set prior to the page being loaded.

 

Kind Regards,

Link to comment
Share on other sites

Doesn't the information in that message suggest to you that you should contact the administrator of that receiving mail server to find out why it considers the email that you sent to it to be spam?

 

Best guess is, if this worked from your previous mail server to that specific receiving mail server, but not from your current mail server, it is likely due to missing or incorrect dns zone records (A, MX, SPF) for your sending mail server.

Link to comment
Share on other sites

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.