| @@ 782-795 (lines=14) @@ | ||
| 779 | $this->attachmentIds[] = $ret; |
|
| 780 | return $ret; |
|
| 781 | } |
|
| 782 | elseif ($input instanceof Swift_File) |
|
| 783 | { |
|
| 784 | try { |
|
| 785 | $ret = $this->message->attach(new Swift_Message_Image($input)); |
|
| 786 | $this->attachmentIds[] = $ret; |
|
| 787 | return $ret; |
|
| 788 | } catch (Swift_Message_MimeException $e) { |
|
| 789 | $this->setError("An attachment failed to attach:<br />" . $e->getMessage()); |
|
| 790 | return false; |
|
| 791 | } catch (Swift_FileException $e) { |
|
| 792 | $this->setError("An attachment failed to attach:<br />" . $e->getMessage()); |
|
| 793 | return false; |
|
| 794 | } |
|
| 795 | } |
|
| 796 | else |
|
| 797 | { |
|
| 798 | try { |
|
| @@ 828-841 (lines=14) @@ | ||
| 825 | $this->attachmentIds[] = $ret; |
|
| 826 | return $ret; |
|
| 827 | } |
|
| 828 | elseif ($data instanceof Swift_File) |
|
| 829 | { |
|
| 830 | try { |
|
| 831 | $ret = $this->message->attach(new Swift_Message_EmbeddedFile($data, $filename, $type, $cid)); |
|
| 832 | $this->attachmentIds[] = $ret; |
|
| 833 | return $ret; |
|
| 834 | } catch (Swift_Message_MimeException $e) { |
|
| 835 | $this->setError("An attachment failed to attach:<br />" . $e->getMessage()); |
|
| 836 | return false; |
|
| 837 | } catch (Swift_FileException $e) { |
|
| 838 | $this->setError("An attachment failed to attach:<br />" . $e->getMessage()); |
|
| 839 | return false; |
|
| 840 | } |
|
| 841 | } |
|
| 842 | else |
|
| 843 | { |
|
| 844 | try { |
|
| @@ 842-855 (lines=14) @@ | ||
| 839 | return false; |
|
| 840 | } |
|
| 841 | } |
|
| 842 | else |
|
| 843 | { |
|
| 844 | try { |
|
| 845 | $ret = $this->message->attach(new Swift_Message_EmbeddedFile($data, $filename, $type, $cid)); |
|
| 846 | $this->attachmentIds[] = $ret; |
|
| 847 | return $ret; |
|
| 848 | } catch (Swift_Message_MimeException $e) { |
|
| 849 | $this->setError("An attachment failed to attach:<br />" . $e->getMessage()); |
|
| 850 | return false; |
|
| 851 | } catch (Swift_FileException $e) { |
|
| 852 | $this->setError("An attachment failed to attach:<br />" . $e->getMessage()); |
|
| 853 | return false; |
|
| 854 | } |
|
| 855 | } |
|
| 856 | } |
|
| 857 | /** |
|
| 858 | * Add headers to the message |
|