email from script to client mailbox.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • plumpnation
    New Member
    • Sep 2006
    • 16

    email from script to client mailbox.

    Warning: mail(): SMTP server response: 550 Requested action not taken: mailbox unavailable or not local in.....


    This is the error message.

    The history of this situation is this: We took a job where the clients' old hosting company were and still are very unhelpful.

    They still have the domain in their posession as the client did not want the mail to go down during the transfer process.

    There is a contact form on the site now that sends variables to a php script which sends the mail.

    I have sent tests internally on the server AND externally to hotmail, gmail and yahoo - all with success.

    When I try to send to the clients mailbox, still in the possessed by the ex-hosts, the script returns this error.

    I rang them up, and they were as usual very unhelpful and unprofessional, but told me that they had had this problem before but couldn't remember how they fixed it, and that I needed to find some way to tell the clients mailbox that this wasn't a robot spam message type thing.

    Has anybody got any idea how to authenticate a php mail script to bypass security filters? It would seem to me that any such authentication would need to be confirmed by a script at their end, like a key and lock.

    Is this just a load of rubbish and are they just being awkward? My guess is that they could simply allow the I.P. address of the server to bypass spam filters etc.

    I really need peoples opinions and knowledge on this one, so don't hold back.

    Thanks as always...
  • BeRtjh
    New Member
    • Jan 2007
    • 12

    #2
    just use:

    [PHP]mail($mail, $subject, $body);[/PHP]

    Comment

    • byersj21
      New Member
      • Jan 2007
      • 2

      #3
      I'm having the same problem. I get the error:
      Warning: mail(): SMTP server response: 550 Requested action not taken: mailbox unavailable or not local

      Now, the client has their own internal mail server, but using outside hosting. I just can't figure this out.. but I have a theory.

      I can use the following script below and it works fine if I put my own email or other emails that doesn't have cadresys.com at the end of it. I'm thinking it's some issue with SMTP authentication and I have no idea how to set that up in the form. You can look at my code and tell me what I'm doing wrong. I'm no expert with this stuff, but I can use it enough to get by.

      code:
      <?php
      error_reporting (E_ALL ^ E_NOTICE);
      if(!$_POST['erf_Name']) {
      $errMessage = "Name required!<BR> ";
      }
      if(!$_POST['erf_Phone']) {
      $errMessage .= "Phone number required!<BR> ";
      }
      if(!$_POST['erf_Event']=="Select desired event") {
      $errMessage .= "Please select desired event.<BR> ";
      }
      if(!$_POST['erf_NumberofAt tendees']) {
      $errMessage .= "Please tell us how many will attend.<BR> ";
      }
      if(!$_POST['erf_HearAbout']=="Select..." ) {
      $errMessage .= "Please answer how you heard about us.<BR> ";
      }
      if(!strrchr($_P OST['erf_Email'],"@") || !strrchr($_POST['erf_Email'],".")){
      $errMessage .="Invalid email!<BR>";
      }

      $xHeaders = $_POST['$erf_Email'];

      if($_POST['erf_Event']=="Augi Cad Camp in Charlotte May 3rd") {
      $to = "somebody1@cadr esys.com, somebody2@cadre sys.com";
      }
      if($_POST['erf_Event']=="Carolinas Expo Feb 15th") {
      $to = "somebody1@cadr esys.com, somebody2@cadre sys.com";
      }
      if($_POST['erf_Event']=="NC Revit User Group- May 10th") {
      $to = "somebody1@cadr esys.com, somebody2@cadre sys.com";
      }
      if($_POST['erf_Event']=="NC Revit User Group- April 12th") {
      $to = "somebody1@cadr esys.com, somebody2@cadre sys.com";
      }
      if($_POST['erf_Event']=="NC Revit User Group- March 8th") {
      $to = "somebody1@cadr esys.com, somebody2@cadre sys.com";
      }
      if($_POST['erf_Event']=="NC Revit User Group- Febuary 8th") {
      $to = "somebody1@cadr esys.com, somebody2@cadre sys.com";
      }
      if($_POST['erf_Event']=="SouthEast Design March 7th") {
      $to = "somebody1@cadr esys.com, somebody2@cadre sys.com";
      }
      if($_POST['erf_Event']=="North Carolina Society Feb 1st") {
      $to = "somebody1@cadr esys.com, somebody2@cadre sys.com";
      }
      if($_POST['erf_Event']=="South-Tec Advanced October 10th") {
      $to = "somebody1@cadr esys.com, somebody2@cadre sys.com";
      }

      $name = $_POST['erf_Name'];
      $event = "Event Confirmation " . $_POST['erf_Event'];
      $bodyNote .= "<--- Note: Please send a confirmation email to the persons email below. --->" . "\n" . "--- Copy this text and paste in email ---" . "\n" . "This is a confirmation email from Cadre Systems that we recieved " . $_POST['erf_Name'] . " request for " . $_POST['erf_Event'] . " event" . "\n" . "\n";
      $bodyName .= "Name: " . $_POST['erf_Name'] . "\n" . "\n";
      $bodyCompany .= "Company: " . $_POST['erf_Company'] . "\n" . "\n";
      $bodyAddress .= "Address: " . "\n" . $_POST['erf_Address1'] . "\n" . $_POST['erf_Address2'] . "\n" . $_POST['erf_City'] . " " . $_POST['erf_State'] . " " . $_POST['erf_ZipCode'] . "\n" . "\n";
      $bodyPhone .= "Phone: " . $_POST['erf_Phone'] . $_POST['erf_Ext'] ."\n" . "\n";
      $bodyEmail .= "Email Address: " . $_POST['erf_Email'] . "\n" . "\n";
      $bodyEvent .= "Event: " . $_POST['erf_Event'] . "\n" . "\n";
      $bodyAttendees .= "Number of Attendees: " . $_POST['erf_NumberofAt tendees'] . "\n" . "\n";
      $bodyHear .= "How did you hear about us: " . $_POST['erf_HearAbout'] . "\n" . "\n";
      $bodyComments .= "Comments: ". "\n" . $_POST['erf_Comments'] ;
      $message = "$bodyNote" . "$bodyName" . "$bodyCompa ny" . "$bodyAddre ss" . "$bodyPhone " . "$bodyEmail " . "$bodyEvent " . "$bodyAttendees " . "$bodyHear" . "$bodyComments" ;
      $sent = "Thank you for your email " . $name . " Your request for the " . $_POST['erf_Event'] . " event has been sent to Cadre Systems." . " An email confirmation will be sent to you shortly.";
      if(!isset($errM essage)) {
      mail($to, $event, $message, $xHeaders);
      echo "$sent";
      }
      Of course, this script works with my own email or other yahoo.. ect accounts. Also, I know others may have a better technique that what I have and if so.. please share. I probably should be using an array for the if statements, but right now I'm just making something work.

      Other strange things to maybe help solve this problem, is I have trouble sending these people an email from my main email address thru my webmail and my local email application. Even happens with my secondary email address. I don't have this problem with anyone else.. just these people at Cadresys.com. So, I'm wondering if it's a firewall thing or what?

      I appreciate all the help I can get on this. And one last thing I was trying to do was cc the person who sent the form. Instead, I'm going to have to have the company send an email to them once they recieve this email.. but unfortunately, I can't even get that to happen.

      Comment

      • byersj21
        New Member
        • Jan 2007
        • 2

        #4
        Another thing I wanted to mention.
        1. This company originally purchased their domain name thru network solutions. ( I don't have access to it yet)
        2. Hosting is with earthlink, but the problem there is that I have to put a 4 on my php pages and earthlink will not fix that problem. I've never had to do that before.. I even tried fiddling with the .htaccess file and that didn't seem to help.
        3. New website is on a new server. Me and a couple of guys are running a hosting server specifically for clients only, so we don't have separate email and dns servers. Therefore, I don't feel comfortable putting this clients DNS/MX records on our server. We just want to host the website on our server but using Network Solutions for all the DNS/MX records. I can see they had set that up on the earthlink hosting.. but I don't see any CName records, which I need for our server. I'm assuming that information is on network solutions. And the big kicker is the mail server is run internally by the company. So.. it's a big mess and I need a solution to make things work correctly.

        So, right now, I have a redirect in the index page when you go to www.cadresys.co m . I'm wondering if the problems lie somewhere in there. I'm sure some may think this scenerio is crazy and it is.. but what would you do in this situation to fix it?

        Comment

        Working...