Created
February 27, 2018 13:23
-
-
Save wgroenewold/97afae65ff5c1cf84e4eae1badaf1ed0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$body = | |
'<!--[if gte mso 9]> | |
<img src="cid:logo" width="300" height="400" /> | |
<![endif]--> | |
<img style="mso-hide:all;" src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAetc." />'; | |
$file = __DIR__ . '/btn1.png'; | |
$uid = 'logo'; | |
global $phpmailer; | |
add_action( 'phpmailer_init', function(&$phpmailer)use($file,$uid){ | |
$phpmailer->SMTPKeepAlive = true; | |
$phpmailer->AddEmbeddedImage($file, $uid); | |
}); | |
wp_mail('[email protected]','Subject',$body); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment