I need to send an email with folders (images) that are already on the server. Does anyone have an idea how to do this? Sending the email is already working. I'm using codeigniter and phpmailer.
I need to send an email with folders (images) that are already on the server. Does anyone have an idea how to do this? Sending the email is already working. I'm using codeigniter and phpmailer.
There are a few ways.
The first is to have the image a public path of the server and only use the tag:
<img src="caminho/absoluto/imagem.png" />
It is also possible to add the image with PHPMailer itself using the AddEmbeddedImage method
$mail->AddEmbeddedImage('img/error.png', 'teste');
If I'm not mistaken you need to put a tag with the attached image id:
<img src='cid:teste'>
Abs
Resolved , I've added this line:
$mail->AddAttachment("caminho_da_imagem/imagem.png");