Jump to content

fckeditor & mail()


Slavison

Recommended Posts

Hello, guys.

 

I have a page with included fckeditor. I type a message in it, add images (just smiles or photos), and I want to send it to an e-mail address with all photos included (as html-message). Then someone receives this message with attached images, which are shown in the message body.

 

It this possible?

Link to comment
https://forums.phpfreaks.com/topic/136597-fckeditor-mail/
Share on other sites

Thanks for your reply, genericnumber1.

The images are on the server in "images" folder, and they are added through fckeditor as <img src="image/photo.jpg /> (as an example). But in order to attach these images to my message and then show them in html-body (without connection to the server: the images are attached to the message) they must be attached as "photo.jpg", "photo2.jpg", etc...(I use phpmailer for this, but "image/" must be trimmed before). And moreover all <img src="image/photo....jpg /> must be replaced with <img src="cid:id of the image" /> (according to phpmailer rules).

 

So, as far as I understand, the outline is as follows: I parse all "image/bla-bla.jpg(gif, png, whatever...)" inside "img" tags, trim all "image/", put all file names in the header ($mail->AddEmbeddedImage("bla-bla.jpg", "bla-bla_1", bla-bla.jpg") — according to phpmailer rules) and then replace all <img src="image/bla-bla.jpg" /> with <img src="cid:id_1" (id_2, id_3, ad so on) /> in html-body. Ah, and I don't know file names in advance. That's why I must use parsing. It looks confusing for me.  ???

Can't do this...

Link to comment
https://forums.phpfreaks.com/topic/136597-fckeditor-mail/#findComment-714558
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.