referencezoqa.blogg.se

Javascript resize image base64
Javascript resize image base64










javascript resize image base64

Result := StringReplace(Result, '<', ' 0 do begin IdMessageClient, IdSMTPBase, IdSMTP, IdIOHandler, IdIOHandlerSocket,įunction HtmlDecode (const AStr: String): String IdComponent, IdTCPConnection, IdTCPClient, IdExplicitTLSClientServerBase, It's not optimal sourses but you can get main idia from it. Here is part of my old project that add all html images into attachments from 'file names' into corrent identifiers. In this case all client mail viewers must show email as it's should be. Generic solution for using images in html part of email it’s build in images as attachment and use attachment ID as SRC of image. I also tried to use TIdMessageBuilderHtml, but without success on this case. IdSSL:= TIdSSLIOHandlerSocketOpenSSL.Create(nil) email.ContentType := 'text/html' //email comes with plain text, but not images IdMessage, idText, IdSMTP, IdSSLOpenSSL, IdExplicitTLSClientServerBase Į := 'recipient' Įmail.ContentType := 'multipart/mixed' //email comes with HTML text I receive the HTML code, or the text with a broken image, or the image don't even load (comes with a blank space).īUT, when I open the HTML file in a common browser (ie, Chrome or Firefox), the image loads without problem. This HTML is just for testing, but even with this simple base64 image and plain text, when I send it via email with Indy, I don't receive the image correctly. I want to use Indy to send emails with embedded images, and for those cases the HTML template must have the base64 converted image.












Javascript resize image base64