//$mail->AddEmbeddedImage("data:image/jpeg;base64,'.base64_encode($cmpimage).'", "img","image/*");`
$mail->AddEmbeddedImage("GM Community Profile Image.jpg", "my-attach", "image/jpeg");`
//$mail->Body = '<img alt="hey" src="data:image/jpeg;base64,'.base64_encode($cmpimage).'">';
$mail->Body = '<img alt="PHPMailer" src="cid:my-attach"> ';
I need a way to send an email with an image in it(not attachments) and the image is taken from a form or a database.Im using phpmailer for mailing purposes.
I am new to php learning in trail and error fashion.Please help me find a solution. Thank you in advance.