Getting a phpmailerException error due to my attachments when my plugin runs When my plugin runs, I'm getting a PHP Mailer Exception error stating:

"Could not access file: http://s3.amazonaws.com/patternmanager/clients/healthstream/question-attachments/download.jpeg"

The url being pulled in is correct, and the file exists. I'm still very new to this, but the best I can figure out is that this is some kind of permissions issue?

Is there something in my code that might be causing a problem? Am I calling in the attachments correctly? Any direction is greatly appreciated.

public function init()
{
    parent::init();

    //Event: onSaveEntry
    craft()-&gt;on('entries.saveEntry', function(Event $event)
    {

        $entry = $event-&gt;params['entry'];
        $isNewEntry = $event-&gt;params['isNewEntry'];
        $entrySection = $entry-&gt;section;

        $attachments = $entry-&gt;questionAttachments;

        if ($isNewEntry and $entrySection == 'Questions')  {
            //Get all users from UserGroup
            $user_criteria = craft()-&gt;elements-&gt;getCriteria(ElementType::User);
            $user_criteria-&gt;groupId = '9';
            $users = $user_criteria-&gt;find();

            //Send to each User
            foreach ($users as $user) {
                //Send Mail
                $email = new EmailModel();
                $email-&gt;toEmail = $user-&gt;email;
                $email-&gt;subject = 'New Question';
                $email-&gt;htmlBody    =

                'A new question has been posted: &lt;a href="'.$entry-&gt;url.'" title="'.$entry-&gt;title.'"&gt;'.$entry-&gt;title.'&lt;/a&gt;';

                if ($attachments) {
                    foreach ($attachments as $attachment) {
                        $email-&gt;addAttachment($attachment-&gt;url, $attachment-&gt;filename, 'base64', $attachment-&gt;kind);
                    }
                }

                craft()-&gt;email-&gt;sendEmail($email);
            }
        }
    });
}
PHPMailer is only going work with local files for attachments, so you'll need to download the file from S3 into a known location, and pass that location in as the first parameter to addAttachment.