Results 1 to 3 of 3

Thread: [SOLVED] Return Path in php's mail function

  1. #1
    akende is offline Starter Member
    Join Date
    Oct 2010
    Posts
    2
    Rep Power
    4

    Default [SOLVED] Return Path in php's mail function

    Hi everyone!
    I have this code:

    <?php
    $destinatario="destinatario@domain.com";
    $asunto = "Subject";
    $cuerpo = "Content of the test message.";
    $cabecera .= "MIME-Version: 1.0\r\n";
    $cabecera .= "Content-type: text/html; charset=iso-8859-1\r\n";
    $cabecera .= "From: reply@domain.com\r\n";
    $cabecera .= "Reply-To: reply@domain.com\r\n";
    $cabecera .= "X-Mailer: PHP/" . phpversion();
    $cabecera .= "Return-Path: emailreturn@domain.com\r\n";
    $myreturnpath = "-femailreturn@domain.com";
    echo ($destinatario);
    echo(" ");

    mail($destinatario,$asunto,$cuerpo,$cabecera,$myre turnpath);
    }

    When I execute, i receive the mail, but if I put a non-existing e-mail address, I don't receive anything.
    What's the problem??

    Thanx!

  2. #2
    phoenix is online now Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,495
    Rep Power
    56

    Default

    Quote Originally Posted by akende View Post
    When I execute, i receive the mail, but if I put a non-existing e-mail address, I don't receive anything.
    What's the problem??
    There's no problem, you should eventually get a bounce notice (NDR).
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  3. #3
    akende is offline Starter Member
    Join Date
    Oct 2010
    Posts
    2
    Rep Power
    4

    Default Resolved

    Hello again,
    Thank u for the reply.
    Finally I was able to run the code and it works!
    The problem was in the php.ini file.

    Regards

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Problems with port 25
    By yogiman in forum Installation
    Replies: 57
    Last Post: 06-13-2011, 01:55 PM
  2. Replies: 7
    Last Post: 02-03-2011, 07:01 AM
  3. Problem with Postfix and MTA
    By ZMilton in forum Administrators
    Replies: 16
    Last Post: 04-16-2008, 06:47 AM
  4. [SOLVED] Mailserver down when send file attach of 50Mb
    By ZMilton in forum Administrators
    Replies: 20
    Last Post: 04-10-2008, 11:44 AM
  5. fresh install down may be due to tomcat
    By gon in forum Installation
    Replies: 10
    Last Post: 07-25-2007, 08:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •