+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: map-mail-compose php return_path

  1. #1
    stsights is offline x10 Sophmore stsights is an unknown quantity at this point
    Join Date
    Dec 2007
    Posts
    159

    Question map-mail-compose php return_path

    Hello. I have a trouble with the envelope return_path.
    My php script has this.

    $envelope["from"]= "info@mensajote.com";
    $envelope["return_path"]= "info@mensajote.com";
    $envelope["in_reply_to"]= "info@mensajote.com";
    $envelope["reply_to"]= "info@mensajote.com";

    But the email that I sent arrive with this.

    Return-path: <@artic.x10hosting.com>
    Envelope-to: sms@mensajote.com
    Delivery-date: Sun, 05 Apr 2009 23:08:48 -0500
    Received: from stsights by artic.x10hosting.com with local (Exim 4.69)
    (envelope-from <@artic.x10hosting.com>)
    id 1Lqg8Z-0002a8-3X
    for sms@mensajote.com; Sun, 05 Apr 2009 23:08:43 -0500
    To: sms@mensajote.com
    Subject: DE: ss
    From: info@mensajote.com
    Reply-To: info@mensajote.com
    In-Reply-To: info@mensajote.com
    If you look the return_path is not changed to info@mensajote.com and it should be changed because in the script is correctly put in $envelope["return_path"]= "info@mensajote.com";

    Could any one knows how to fix this error??

    Thanks a lot guys.

  2. #2
    stsights is offline x10 Sophmore stsights is an unknown quantity at this point
    Join Date
    Dec 2007
    Posts
    159

    Re: map-mail-compose php return_path

    does any one know how to do this??

  3. #3
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: map-mail-compose php return_path

    You didn't provide enough information. How are you sending the e-mail? When asking about code, always include a minimal test case. You did do a good job describing what you want the script to do and what it actually does.

  4. #4
    xav0989's Avatar
    xav0989 is offline Community Public Relation xav0989 is just really nice
    Join Date
    Jul 2008
    Location
    ifk
    Posts
    4,438

    Re: map-mail-compose php return_path

    I believe that return path is the server (correct me if I'm wrong), so I think that it should be a server name. Try responding to your email. If it works, you should be good to go!
    Xavier L | Community Public Relations Manager (Free Hosting Support)
    █ Yes, my position is too cool to even exist!
    How am I helping? Rate this post by clicking the icon below! (this is even better than "liking" a post)
    Terms of Service | Acceptable Use Policy | x10Hosting Wiki

  5. #5
    stsights is offline x10 Sophmore stsights is an unknown quantity at this point
    Join Date
    Dec 2007
    Posts
    159

    Re: map-mail-compose php return_path

    Yes the return path is the server, is the cpanel username@name of the server.
    I send the email via imap function
    $envelope["from"]= "info@mensajote.com";
    $envelope["return_path"]= "info@mensajote.com";
    $part1["type"] = TYPEMULTIPART;
    $part1["subtype"] = "mixed";
    $mail =imap_mail_compose($envelope, $body);

    imap_mail($tigo,$subject,'',$mail))


    Return-path: <stsights@artic.x10hosting.com>
    Envelope-to: sms@mensajote.com
    Delivery-date: Sat, 20 Jun 2009 10:57:11 -0500
    Received: from stsights by artic.x10hosting.com with local (Exim 4.69)
    (envelope-from <stsights@artic.x10hosting.com>)
    id 1MI2wD-0003L6-7I
    for sms@mensajote.com; Sat, 20 Jun 2009 10:57:05 -0500
    To: sms@mensajote.com
    Subject: DE: aaa
    From: info@mensajote.com
    Reply-To: info@mensajote.com
    In-Reply-To: info@mensajote.com
    MIME-Version: 1.0
    Content-Type: MULTIPART/mixed; BOUNDARY="2722458178-2108408561-1245513425=:12837"
    Message-Id: <E1MI2wD-0003L6-7I@artic.x10hosting.com>
    Date: Sat, 20 Jun 2009 10:57:05 -0500
    X-x10hosting-MailScanner-Information: Please contact the ISP for more information
    X-x10hosting-MailScanner-ID: 1MI2wD-0003L6-7I
    X-x10hosting-MailScanner: Found to be clean
    X-x10hosting-MailScanner-SpamCheck: not spam, SpamAssassin (not cached,
    score=0.755, required 5, BASE64_LENGTH_79_INF 1.50, BAYES_20 -0.74,
    NO_RELAYS -0.00)
    X-x10hosting-MailScanner-From: stsights@artic.x10hosting.com
    X-Spam-Status: No


    but with this line $envelope["return_path"]= "info@mensajote.com"; the return path is not replaced with info@mensajote.com, I use the return path to receive an email that if the email that I send fails I receive the fail, but the fail is sent to
    stsights@artic.x10hosting.com

    Is any one that use the return_path just like me??
    Thank you guys

  6. #6
    xav0989's Avatar
    xav0989 is offline Community Public Relation xav0989 is just really nice
    Join Date
    Jul 2008
    Location
    ifk
    Posts
    4,438

    Re: map-mail-compose php return_path

    Wait a second their... try using
    PHP Code:
    $envelope["return-path"]= "info@mensajote.com"
    instead. If I am right, it's simply because return_path is not the same as return-path.
    Last edited by xav0989; 06-20-2009 at 12:02 PM.
    Xavier L | Community Public Relations Manager (Free Hosting Support)
    █ Yes, my position is too cool to even exist!
    How am I helping? Rate this post by clicking the icon below! (this is even better than "liking" a post)
    Terms of Service | Acceptable Use Policy | x10Hosting Wiki

  7. #7
    stsights is offline x10 Sophmore stsights is an unknown quantity at this point
    Join Date
    Dec 2007
    Posts
    159

    Re: map-mail-compose php return_path

    I changed
    $envelope["from"]= "info@mensajote.com";
    $envelope["return-path"]= "info@mensajote.com";
    $envelope["in_reply_to"]= "info@mensajote.com";
    $envelope["reply_to"]= "info@mensajote.com";

    And still appears

    Return-path: <stsights@artic.x10hosting.com>
    Envelope-to: sms@mensajote.com
    Delivery-date: Sat, 20 Jun 2009 12:27:44 -0500
    Received: from stsights by artic.x10hosting.com with local (Exim 4.69)
    (envelope-from <stsights@artic.x10hosting.com>)
    id 1MI4Ls-0002BJ-6p
    for sms@mensajote.com; Sat, 20 Jun 2009 12:27:40 -0500
    To: sms@mensajote.com
    Subject: DE: ss
    From: info@mensajote.com
    Reply-To: info@mensajote.com
    In-Reply-To: info@mensajote.com
    MIME-Version: 1.0
    Content-Type: MULTIPART/mixed; BOUNDARY="2722458178-575898766-1245518860=:8388"
    Message-Id: <E1MI4Ls-0002BJ-6p@artic.x10hosting.com>
    Date: Sat, 20 Jun 2009 12:27:40 -0500
    X-x10hosting-MailScanner-Information: Please contact the ISP for more information
    X-x10hosting-MailScanner-ID: 1MI4Ls-0002BJ-6p
    X-x10hosting-MailScanner: Found to be clean
    X-x10hosting-MailScanner-SpamCheck: not spam, SpamAssassin (not cached,
    score=0.755, required 5, BASE64_LENGTH_79_INF 1.50, BAYES_20 -0.74,
    NO_RELAYS -0.00)
    X-x10hosting-MailScanner-From: stsights@artic.x10hosting.com
    X-Spam-Status: No

  8. #8
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: map-mail-compose php return_path

    Note that the Return-path header is supposed to be added by the final mail server; even if you set it, it may be replaced.

    The stock imap_mail_compose looks for "return_path" and adds it to the list of headers. However, the output of imap_mail_compose on X10 doesn't include the Return-path header. The code
    PHP Code:
    <?php
    $envelope
    = array("from"=>"info@someplace.com",
                     
    'to'  => 'nemo@nusquam.net',
                     
    'cc' => 'nobody@nyet.net',
                     
    'bcc' => 'mother@ispy.net',
                     
    "return_path" => "info@someplace.com",
                     
    'reply_to' => 'info@someplace.com',
                     
    'in_reply_to' => 'id#DEADBEEF',
                     
    'message_id' => 'id#CAFEBABE',
                     
    'date' => 'now',
                     
    'subject' => 'stuff'
        
    );
    $message='Message';
    $body = array(
        array(
    'type' => TYPETEXT,
              
    'subtype' => 'plain',
              
    'description' => 'one',
              
    'contents.data' => "$message"),
        array(
    'type' => TYPEAPPLICATION,
              
    'subtype' => 'xml',
              
    'description' => 'two: XML',
              
    'contents.data' => "<?xml version='1.0'?>\n<msg><b>$message</b></msg>")
        );

    echo 
    imap_mail_compose($envelope$body);
    generates the output:
    Date: now
    From: info@someplace.com
    Reply-To: info@someplace.com
    Subject: stuff
    To: nemo@nusquam.net
    cc: nobody@nyet.net
    In-Reply-To: id#DEADBEEF
    Message-ID: id#CAFEBABE
    MIME-Version: 1.0
    Content-Type: TEXT/plain; CHARSET=US-ASCII
    Content-Description: one

    Message
    Looks like imap_mail_compose isn't having problems with other headers, just Return-path. You could try using a 'custom_headers' entry in $envelope to add Return-path, but it will be added towards the bottom of the headers and the final mail server will probably add one at the top. Which one takes precedence depends on the mail client.

    It could be x10 has a feature limited imap_mail_compose, or there could be something in imap_mail_compose. I'll take a closer look at the source later in case of the latter (unless you do it first).

  9. #9
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: map-mail-compose php return_path

    I finally got around to looking over the source. Turns out the cause is in the IMAP c-client library. imap_mail_compose calls rfc822_header(), which only outputs specific headers, not including Return-path. imap_mail_compose then goes on to print custom headers itself.

    Final analysis: there's no way to set Return-path using imap_mail_compose and reliably have the mail client get the value you want. Of course, you shouldn't be setting Return-path; the final mail server should. Setting Reply-to is the appropriate course, which you're already doing.
    Last edited by misson; 06-22-2009 at 02:54 PM.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

  10. #10
    stsights is offline x10 Sophmore stsights is an unknown quantity at this point
    Join Date
    Dec 2007
    Posts
    159

    Re: map-mail-compose php return_path

    Hi Misson.
    Now I understand why the return-path is never changed, I assumed that the return-path it could be changed because I find some examples with imap_mail_compose using return_path but is not possible to do that.

    Misson a final question the server do the final address in return_path, but just for imap_mail_compose or we can set the return_path in the headers of the mail?

    Thank you for all your responses.

+ Reply to Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. php mail
    By k01337 in forum Soporte
    Replies: 5
    Last Post: 05-10-2008, 09:45 AM
  2. PHP mail()
    By banzap in forum Free Hosting
    Replies: 3
    Last Post: 03-12-2008, 08:35 PM
  3. mail() disabled w/ php v2
    By greenie in forum Free Hosting
    Replies: 1
    Last Post: 11-02-2007, 09:06 PM
  4. php mail function not working
    By aenman in forum Free Hosting
    Replies: 1
    Last Post: 10-26-2007, 11:16 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
x10hosting free hosting for the masses
dedicated servers