As we see below, there is no method called getAttachments() , since I can list / get / loop through the attachments from the Swift_Message object? I could not find any information in the documentation or example. Listed below are all the methods below, and the doc here . I can check everything else except attachments.
I am using symfony for this.
Array ( [0] => __construct [1] => newInstance [2] => addPart [3] => attachSigner [4] => detachSigner [5] => toString [6] => toByteStream [7] => __wakeup [8] => __clone [9] => getNestingLevel [10] => setSubject [11] => getSubject [12] => setDate [13] => getDate [14] => setReturnPath [15] => getReturnPath [16] => setSender [17] => getSender [18] => addFrom [19] => setFrom [20] => getFrom [21] => addReplyTo [22] => setReplyTo [23] => getReplyTo [24] => addTo [25] => setTo [26] => getTo [27] => addCc [28] => setCc [29] => getCc [30] => addBcc [31] => setBcc [32] => getBcc [33] => setPriority [34] => getPriority [35] => setReadReceiptTo [36] => getReadReceiptTo [37] => attach [38] => detach [39] => embed [40] => __toString [41] => setBody [42] => getCharset [43] => setCharset [44] => getFormat [45] => setFormat [46] => getDelSp [47] => setDelSp [48] => charsetChanged [49] => generateId [50] => getHeaders [51] => getContentType [52] => setContentType [53] => getId [54] => setId [55] => getDescription [56] => setDescription [57] => getMaxLineLength [58] => setMaxLineLength [59] => getChildren [60] => setChildren [61] => getBody [62] => getEncoder [63] => setEncoder [64] => getBoundary [65] => setBoundary [66] => encoderChanged [67] => __destruct )
I can confirm that the object contains attachments. Dump result:
output toString ()
.... ....
var_export () output
Swift_Message::__set_state(array( 'headerSigners' => array ( ), .... .... array ( 'filename' => '38423961aa437473ae2d6cb8caf796d31e20dbc4.jpeg', ), .... ....
source share