Phpmailer send picture problem, prompt send successful, but the picture in the message does not show

Source: Internet
Author: User
Title, body format is HTML, I made an edit page, in the editing page can be displayed, but the image is in the intranet server, and the path is related to


Reply to discussion (solution)

If you look at the path, you know it.

Is the picture connected?
Intranet (or local) picture to be attached

If you look at the path, you know it.


The path is the path to the picture in the Web server, which can be displayed in my own edit page

You can't show it after you accept the message.


Send pictures with Phpmailer as long as the picture path is OK? What is the principle?

Is the picture connected?
Intranet (or local) picture to be attached



The picture is really a link, because it was found in the database. I want to send an article by mail, the article will have pictures, need to be displayed in the content, can not send attachments

What is the path you see in the mail?

What is the path you see in the mail?





The path in the message is the path of the picture taken from the database, and the picture is placed on the intranet server, if it is viewable in the intranet environment.

I want to know right now. What is the principle of Phpmailer e-mail message, should not be as long as a link to send pictures it

/js/ueditor1_3_5-gbk-php/php/upload/84301406165833.jpg

You're not in the right path, are you missing a domain? Your picture in the net, the outside reference picture line?

/js/ueditor1_3_5-gbk-php/php/upload/84301406165833.jpg

You're not in the right path, are you missing a domain? Your picture in the net, the outside reference picture line?



So I also struggle with this problem ah, if the phpmailer send a picture of the function is to send a label and link, the intranet or local images can not be displayed, then this send pictures what use AH

Send local picture with Addembeddedimage method, example

$id = 1; $mail->addembeddedimage (' 03.gif ', $id, ' attachment ', ' base64 ', ' image/gif '); $body. = ";
In the message body will generate
Such a code
It's too much trouble to do it by hand one by one
So you should write a method that matches the local images in the $body, processing them individually

How to deal with the pictures in the intranet, no intranet can not test
Could you please refer to this http://www.oschina.net/code/snippet_54100_2855

Excuse me, is the landlord still there? Also have the same problem, want to consult

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.