public function getAttachmentPart($index)
    {
        $attachments = $this->getAllAttachmentParts();
        if (!isset($attachments[$index])) {
            return null;
        }
        return $attachments[$index];
    }
public function getAttachmentPart($index)
    {
        $attachments = $this->getAllAttachmentParts();
        if (!isset($attachments[$index])) {
            return null;
        }
        return $attachments[$index];
    }
public function getAttachmentPart ( $ index ) { $ attachments = $ this -> getAllAttachmentParts ( ) ; if ( ! isset ( $ attachments [ $ index ] ) ) { return null ; } return $ attachments [ $ index ] ; }
Returns the attachment part at the given 0-based index, or null if none
is set.

@param int $index
@return MessagePart
Returns the attachment part at the given 0 - based index or null if none is set .