Skip to content

Instantly share code, notes, and snippets.

@taleeb35
Last active August 29, 2015 14:07
Show Gist options
  • Save taleeb35/144fac64a80f9ae0e992 to your computer and use it in GitHub Desktop.
Save taleeb35/144fac64a80f9ae0e992 to your computer and use it in GitHub Desktop.
$Email = new CakeEmail('default'); // Php file
$Email->template('default', 'default')
->to($user_email)
->attachments(array(
'photo.png' => array(
'file' => 'http://135smart.com/wp-content/uploads/2014/08/logo.png',
'mimetype' => 'image/png',
'contentId' => 'cid:b7f792ab-98b1-435c-bbdb-14610be008c9'
)
))
->subject('Your Daily Tasks')
->send($email_body);
}
<img src="cid:b7f792ab-98b1-435c-bbdb-14610be008c9"> // layout File
@InternetLogic
Copy link

   $Email->attachments(array(
        'logo.png' => array(
            'file' => '/absolute/path/to/file.png',
            'mimetype' => 'image/png',
            'contentId' => 'b7f792ab-98b1-435c-bbdb-14610be008c9'
        )
    ));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment