Guest

Outputting message body from eZ Components ezcMailMultipartReport object

By: a guest on Jan 28th, 2012  |  syntax: None  |  size: 9.00 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse
Copied
  1. ezcMailMultipartReport Object
  2. (
  3.         [parts:protected] => Array
  4.                 (
  5.                         [0] => ezcMailText Object
  6.                                 (
  7.                                         [headers:private] => ezcMailHeadersHolder Object
  8.                                                 (
  9.                                                         [lookup:private] => Array
  10.                                                                 (
  11.                                                                         [content-description] => Content-Description
  12.                                                                         [content-type] => Content-Type
  13.                                                                 )
  14.  
  15.                                                         [map:private] => Array
  16.                                                                 (
  17.                                                                         [Content-Description] => Notification
  18.                                                                         [Content-Type] => text/plain; charset=us-ascii
  19.                                                                 )
  20.  
  21.                                                 )
  22.  
  23.                                         [headerCharsets:private] => Array
  24.                                                 (
  25.                                                         [Content-Description] => us-ascii
  26.                                                         [Content-Type] => us-ascii
  27.                                                 )
  28.  
  29.                                         [excludeHeaders:private] => Array
  30.                                                 (
  31.                                                 )
  32.  
  33.                                         [properties:protected] => Array
  34.                                                 (
  35.                                                         [text] => This is the mail system at host example.com.
  36.  
  37. I'm sorry to have to inform you that your message could not
  38. be delivered to one or more recipients. It's attached below.
  39.  
  40. For further assistance, please send mail to postmaster.
  41.  
  42. If you do so, please include this problem report. You can
  43. delete your own text from the attached returned message.
  44.  
  45.                                    The mail system
  46.  
  47. : Host or domain name not found. Name service error for
  48.         name=lskjsdf.com type=A: Host not found
  49.  
  50.                                                         [charset] => utf-8
  51.                                                         [encoding] => 8bit
  52.                                                         [subType] => plain
  53.                                                         [originalCharset] => us-ascii
  54.                                                         [size] => 501
  55.                                                 )
  56.  
  57.                                 )
  58.  
  59.                         [1] => ezcMailDeliveryStatus Object
  60.                                 (
  61.                                         [headers:private] => ezcMailHeadersHolder Object
  62.                                                 (
  63.                                                         [lookup:private] => Array
  64.                                                                 (
  65.                                                                 )
  66.  
  67.                                                         [map:private] => Array
  68.                                                                 (
  69.                                                                 )
  70.  
  71.                                                 )
  72.  
  73.                                         [headerCharsets:private] => Array
  74.                                                 (
  75.                                                 )
  76.  
  77.                                         [excludeHeaders:private] => Array
  78.                                                 (
  79.                                                 )
  80.  
  81.                                         [properties:protected] => Array
  82.                                                 (
  83.                                                         [message] => ezcMailHeadersHolder Object
  84.                                                                 (
  85.                                                                         [lookup:private] => Array
  86.                                                                                 (
  87.                                                                                         [reporting-mta] => Reporting-MTA
  88.                                                                                         [x-postfix-queue-id] => X-Postfix-Queue-ID
  89.                                                                                         [x-postfix-sender] => X-Postfix-Sender
  90.                                                                                         [arrival-date] => Arrival-Date
  91.                                                                                 )
  92.  
  93.                                                                         [map:private] => Array
  94.                                                                                 (
  95.                                                                                         [Reporting-MTA] => dns; example.com
  96.                                                                                         [X-Postfix-Queue-ID] => 78A6E92D38
  97.                                                                                         [X-Postfix-Sender] => rfc822; bounce@bounce.example.com
  98.                                                                                         [Arrival-Date] => Fri, 12 Jun 2009 17:43:07 -0400 (EDT)
  99.                                                                                 )
  100.  
  101.                                                                 )
  102.  
  103.                                                         [recipients] => ArrayObject Object
  104.                                                                 (
  105.                                                                         [0] => ezcMailHeadersHolder Object
  106.                                                                                 (
  107.                                                                                         [lookup:private] => Array
  108.                                                                                                 (
  109.                                                                                                         [final-recipient] => Final-Recipient
  110.                                                                                                         [original-recipient] => Original-Recipient
  111.                                                                                                         [action] => Action
  112.                                                                                                         [status] => Status
  113.                                                                                                         [diagnostic-code] => Diagnostic-Code
  114.                                                                                                 )
  115.  
  116.                                                                                         [map:private] => Array
  117.                                                                                                 (
  118.                                                                                                         [Final-Recipient] => rfc822; kjdskfj@lskjsdf.com
  119.                                                                                                         [Original-Recipient] => rfc822;kjdskfj@lskjsdf.com
  120.                                                                                                         [Action] => failed
  121.                                                                                                         [Status] => 5.4.4
  122.                                                                                                         [Diagnostic-Code] => X-Postfix; Host or domain name not found. Name service error    for name=lskjsdf.com type=A: Host not found
  123.  
  124.                                                                                                 )
  125.  
  126.                                                                                 )
  127.  
  128.                                                                 )
  129.  
  130.                                                         [size] => 431
  131.                                                 )
  132.  
  133.                                 )
  134.  
  135.                         [2] => ezcMailRfc822Digest Object
  136.                                 (
  137.                                         [headers:private] => ezcMailHeadersHolder Object
  138.                                                 (
  139.                                                         [lookup:private] => Array
  140.                                                                 (
  141.                                                                         [content-type] => Content-Type
  142.                                                                         [content-disposition] => Content-Disposition
  143.                                                                 )
  144.  
  145.                                                         [map:private] => Array
  146.                                                                 (
  147.                                                                         [Content-Type] => message/rfc822
  148.                                                                         [Content-Disposition] => inline
  149.                                                                 )
  150.  
  151.                                                 )
  152.  
  153.                                         [headerCharsets:private] => Array
  154.                                                 (
  155.                                                         [Content-Type] => us-ascii
  156.                                                         [Content-Disposition] => us-ascii
  157.                                                 )
  158.  
  159.                                         [excludeHeaders:private] => Array
  160.                                                 (
  161.                                                 )
  162.  
  163.                                         [properties:protected] => Array
  164.                                                 (
  165.                                                         [mail] => ezcMail Object
  166.                                                                 (
  167.                                                                         [headers:private] => ezcMailHeadersHolder Object
  168.                                                                                 (
  169.                                                                                         [lookup:private] => Array
  170.                                                                                                 (
  171.                                                                                                         [received] => Received
  172.                                                                                                         [dkim-signature] => DKIM-Signature
  173.                                                                                                         [domainkey-signature] => DomainKey-Signature
  174.                                                                                                         [from] => From
  175.                                                                                                         [to] => To
  176.                                                                                                         [subject] => Subject
  177.                                                                                                         [mime-version] => MIME-Version
  178.                                                                                                         [user-agent] => User-Agent
  179.                                                                                                         [date] => Date
  180.                                                                                                         [message-id] => Message-Id
  181.                                                                                                         [content-type] => Content-Type
  182.                                                                                                         [content-transfer-encoding] => Content-Transfer-Encoding
  183.                                                                                                 )
  184.  
  185.                                                                                         [map:private] => Array
  186.                                                                                                 (
  187.                                                                                                         [Received] => from localhost (example.com [127.0.0.1]) by example.com (Postfix) with ESMTP id 51C3192D2A for ; Fri, 12 Jun 2009 17:43:07 -0400 (EDT)
  188.                                                                                                         [DKIM-Signature] => v=1; a=rsa-sha1; c=relaxed; d=example.com; h=from:to :subject:mime-version:date:message-id:content-type :content-transfer-encoding; s=qs762.1; bh=o1jS7VG7S60y5SvP5lioDm 5B7VY=; b=Bojv0GjNWsHTRyiKZ631bvWczjntEJZsegrsU2tt/1EI4KVQnRXmT+ u4oX6cQTpPK2xxZfiZ3BymPsoOD3weKSFmdwDOEUB4vEDdG+Bx697345c+KaSpdw IlJh2o3x0Zus/Ov8xRelHX+/6sklnN1GDllEQV2JlcKdKxR+fUrOQ=
  189.                                                                                                         [DomainKey-Signature] => a=rsa-sha1; c=nofws; d=example.com; h=from:to :subject:mime-version:date:message-id:content-type :content-transfer-encoding; q=dns; s=qs762.1; b=HHzMU01/vNx4dBL5 OKyfxQzKytIIJB4KGhKWfFpSdsNNMPwCjrnRthz0wR4wqSgMIDmGobYOLujHekwM 1lLOAnMEQrXRWYHaIHBNIIrxemq1btuiMe8zNKEG3X/wSmYQE3xzInwPurB9iLAa Rjie7bJgTk0Tg+x54hav6l464Ok=
  190.                                                                                                         [From] => Example From
  191.                                                                                                         [To] => Ian Cook
  192.                                                                                                         [Subject] => ezmail test 14:43:07
  193.                                                                                                         [MIME-Version] => 1.0
  194.                                                                                                         [User-Agent] => eZ Components
  195.                                                                                                         [Date] => Fri, 12 Jun 2009 14:43:07 -0700
  196.                                                                                                         [Message-Id] => <2009061214141207.76354.0@example.com>
  197.                                                                                                         [Content-Type] => text/plain; charset=us-ascii
  198.                                                                                                         [Content-Transfer-Encoding] => quoted-printable
  199.                                                                                                 )
  200.  
  201.                                                                                 )
  202.  
  203.                                                                         [headerCharsets:private] => Array
  204.                                                                                 (
  205.                                                                                         [Received] => us-ascii
  206.                                                                                         [DKIM-Signature] => us-ascii
  207.                                                                                         [DomainKey-Signature] => us-ascii
  208.                                                                                         [From] => us-ascii
  209.                                                                                         [To] => us-ascii
  210.                                                                                         [Subject] => us-ascii
  211.                                                                                         [MIME-Version] => us-ascii
  212.                                                                                         [User-Agent] => us-ascii
  213.                                                                                         [Date] => us-ascii
  214.                                                                                         [Message-Id] => us-ascii
  215.                                                                                         [Content-Type] => us-ascii
  216.                                                                                         [Content-Transfer-Encoding] => us-ascii
  217.                                                                                 )
  218.  
  219.                                                                         [excludeHeaders:private] => Array
  220.                                                                                 (
  221.                                                                                 )
  222.  
  223.                                                                         [properties:protected] => Array
  224.                                                                                 (
  225.                                                                                         [from] => ezcMailAddress Object
  226.                                                                                                 (
  227.                                                                                                         [name] => Example From
  228.                                                                                                         [email] => example@example.com
  229.                                                                                                         [charset] => utf-8
  230.                                                                                                 )
  231.  
  232.                                                                                         [to] => Array
  233.                                                                                                 (
  234.                                                                                                         [0] => ezcMailAddress Object
  235.                                                                                                                 (
  236.                                                                                                                         [name] => Ian Cook
  237.                                                                                                                         [email] => kjdskfj@lskjsdf.com
  238.                                                                                                                         [charset] => utf-8
  239.                                                                                                                 )
  240.  
  241.                                                                                                 )
  242.  
  243.                                                                                         [cc] => Array
  244.                                                                                                 (
  245.                                                                                                 )
  246.  
  247.                                                                                         [bcc] => Array
  248.                                                                                                 (
  249.                                                                                                 )
  250.  
  251.                                                                                         [subject] => ezmail test 14:43:07
  252.                                                                                         [subjectCharset] => utf-8
  253.                                                                                         [body] => ezcMailText Object
  254.                                                                                                 (
  255.                                                                                                         [headers:private] => ezcMailHeadersHolder Object
  256.                                                                                                                 (
  257.                                                                                                                         [lookup:private] => Array
  258.                                                                                                                                 (
  259.                                                                                                                                         [content-type] => Content-Type
  260.                                                                                                                                         [content-transfer-encoding] => Content-Transfer-Encoding
  261.                                                                                                                                 )
  262.  
  263.                                                                                                                         [map:private] => Array
  264.                                                                                                                                 (
  265.                                                                                                                                         [Content-Type] => text/plain; charset=us-ascii
  266.                                                                                                                                         [Content-Transfer-Encoding] => quoted-printable
  267.                                                                                                                                 )
  268.  
  269.                                                                                                                 )
  270.  
  271.                                                                                                         [headerCharsets:private] => Array
  272.                                                                                                                 (
  273.                                                                                                                         [Content-Type] => us-ascii
  274.                                                                                                                         [Content-Transfer-Encoding] => us-ascii
  275.                                                                                                                 )
  276.  
  277.                                                                                                         [excludeHeaders:private] => Array
  278.                                                                                                                 (
  279.                                                                                                                 )
  280.  
  281.                                                                                                         [properties:protected] => Array
  282.                                                                                                                 (
  283.                                                                                                                         [text] => Test mail sent at 14:43:07
  284.  
  285.                                                                                                                         [charset] => utf-8
  286.                                                                                                                         [encoding] => 8bit
  287.                                                                                                                         [subType] => plain
  288.                                                                                                                         [originalCharset] => us-ascii
  289.                                                                                                                         [size] => 27
  290.                                                                                                                 )
  291.  
  292.                                                                                                 )
  293.  
  294.                                                                                         [messageId] => <2009061214141207.76354.0@example.com>
  295.                                                                                         [returnPath] =>
  296.                                                                                 )
  297.  
  298.                                                                 )
  299.  
  300.                                                         [size] => 1473
  301.                                                 )
  302.  
  303.                                 )
  304.  
  305.                 )
  306.  
  307.         [headers:private] => ezcMailHeadersHolder Object
  308.                 (
  309.                         [lookup:private] => Array
  310.                                 (
  311.                                         [content-type] => Content-Type
  312.                                 )
  313.  
  314.                         [map:private] => Array
  315.                                 (
  316.                                         [Content-Type] => multipart/report; boundary="78A6E92D38.1244842987/example.com"
  317.                                 )
  318.  
  319.                 )
  320.  
  321.         [headerCharsets:private] => Array
  322.                 (
  323.                         [Content-Type] => us-ascii
  324.                 )
  325.  
  326.         [excludeHeaders:private] => Array
  327.                 (
  328.                 )
  329.  
  330.         [properties:protected] => Array
  331.                 (
  332.                         [noMimeMessage] => This message is in MIME format. Since your mail reader does not understand
  333. this format, some or all of this message may not be legible.
  334.                         [boundary] => 78A6E92D38.1244842987/example.com
  335.                         [reportType] => delivery-status
  336.                         [size] => 2405
  337.                 )
  338.  
  339. )
  340.        
  341. $parts = $mail->getParts();
  342. print_r($parts);  // or
  343. print_r($parts[0]->body);  // (untested)