1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

PHP Mail Error

Discussion in 'PHP' started by AT-XE, Apr 2, 2008.

  1. #1
    Hello :)
    Today I was trying to mail from my pc with the php mailer and I got an error.

    The error was:

    Warning: mail() [function.mail]: SMTP server response: 553 We do not relay non-local mail, sorry. in E:\xampp\htdocs\mail.php on line 9
    Code (markup):
    And the php script code was:

          <?
         if ($_POST['submit']) {
         ini_set("SMTP","localhost");
    $headers = 'From: mailer@mail.com'' . "\r\n" .
        'Reply-To: mailer@mail.com' . "\r\n" .
        'X-Mailer: PHP/' . phpversion();
           $message = $_REQUEST['message'];
           $title = $_REQUEST['title'];
           mail("mymail@gmail.com", $title, $message, $headers);
          }
          ?>
        
          <form action="<?php $PHP_SELF; ?>" method="post">
          Message: <input type="text" name="message" />
          Title: <input type="text" name="title" />
          <input type="submit" name="submit" />
          </form>
    PHP:
    Any ideas of what can I do?

    Thank you.
     
    AT-XE, Apr 2, 2008 IP
  2. vishnups

    vishnups Banned

    Messages:
    166
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    The issue is with this part
    You need to have a mail like
     
    vishnups, Apr 2, 2008 IP
  3. AT-XE

    AT-XE Peon

    Messages:
    676
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I need to be able to send emails everywhere can someone explain me please :)

    I use mercury!
     
    AT-XE, Apr 2, 2008 IP
  4. vishnups

    vishnups Banned

    Messages:
    166
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You have to use an e-mail address based on your domain e.g. , and not try to use an outside mail address like . (as the address you are sending mail from.)

    Also check if your smtp server requires authentication. SMTP is your outgoing e-mail service.
     
    vishnups, Apr 2, 2008 IP
  5. vishnups

    vishnups Banned

    Messages:
    166
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Hi,

    You may try this too..

    To alow non-local relay can go to Mercury32 / configuration / mercuryS SMTP server / connection control , uncheck the "Do not permit SMTP relaying of non-local mail".
     
    vishnups, Apr 2, 2008 IP
  6. AT-XE

    AT-XE Peon

    Messages:
    676
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Nice, I will try,

    Thanks!
     
    AT-XE, Apr 2, 2008 IP
  7. AT-XE

    AT-XE Peon

    Messages:
    676
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Hmmm, now it lets me send a mail from the script with no errors but the mail never arrives.

    P.S: I opened the port 25 for my router ;)

    Thanks.
     
    AT-XE, Apr 2, 2008 IP
  8. AT-XE

    AT-XE Peon

    Messages:
    676
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #8
    can somebody help me?
     
    AT-XE, Apr 4, 2008 IP