When phpmailer sends an image, it prompts that the image is successfully sent, but the image in the email is not shown as the question. The body format is HTML. I made an editing page and the image can be displayed on the editing page, however, the image is on an intranet server. is it related to the path?
Reply to discussion (solution)
You can see the path.
Is the image connected?
Use intranet (or local) images as attachments
You can see the path.
The path is the path of the image on the intranet server. it can be displayed normally on my own editing page.
The email cannot be displayed after it is accepted.
Can I use phpmailer to send images as long as the image path is used? What is the principle?
Is the image connected?
Use intranet (or local) images as attachments
The image is indeed a link, because it is found from the database. I want to send an article by email. there will be images in the article, which must be displayed in the content. attachments cannot be sent.
What is the path in the email?
What is the path in the email?
The path in the email is the path of the image taken from the database. The image is placed on an intranet server and can be viewed in an intranet environment.
Now I want to know how phpmailer works to send emails. I should not be able to send images with just one link.
/Js/ueditor1_3_5-gbk-php/php/upload/84301406165833.jpg
Is this path incorrect? is the domain name missing? Does your image reference the image line on the Internet over the intranet?
/Js/ueditor1_3_5-gbk-php/php/upload/84301406165833.jpg
Is this path incorrect? is the domain name missing? Does your image reference the image line on the Internet over the intranet?
So I am also entangled in this issue. if phpmailer only sends tags and links to images, the images in the intranet or local network will not be displayed, so what is the purpose of sending an image?
Use the AddEmbeddedImage method to send a local image, for example
$id = 1;$mail->AddEmbeddedImage('03.gif', $id, 'attachment', 'base64', 'image/gif');$body .= '';
In the body of the email
Such code
It's too troublesome to do it one by one.
Therefore, you should write a method to match the local image in $ body and process it one by one.
How can I process images in the intranet? it cannot be tested without the intranet.
You can refer to this http://www.oschina.net/code/snippet_54100_2855
Is the landlord still there? I have the same question. could you please advise?