Slavison Posted December 12, 2008 Share Posted December 12, 2008 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 More sharing options...
genericnumber1 Posted December 13, 2008 Share Posted December 13, 2008 Assuming all of the images have an associated url path to the image.... yes? Link to comment https://forums.phpfreaks.com/topic/136597-fckeditor-mail/#findComment-714385 Share on other sites More sharing options...
Slavison Posted December 13, 2008 Author Share Posted December 13, 2008 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.