Hi, I'm trying to send an email with pictures as inline attachments, i.e. MHTML. (actually, I'm trying to send an email with a green checkmark gif for a bit value of 'true'(-1), and a a red X gif for a bit value of 'false'(0), but I'll settle for just figuring out how to embed the base 64 gifs as a start). Anybody have and pointers? The folowing doesn't work at all (even the char(10)s and char(13)s are ignoredI started with an example from the rfc for multipart Mime, with my own gifs:DECLARE @tableHTML NVARCHAR(MAX) ;SET @tableHTML = N'Mime-Version: 1.0' + CHAR(13)+ CHAR(10) +N'Content-Type: multipart/related; boundary="boundary";' + char(13) +N' type="text/html" ' +N' --boundary' +N' Content-Type: text/html; charset="US-ASCII"' +N' ... text of the HTML document, which might contain a URI' +N' referencing a resource in another body part, for example' +N' through a statement such as:' +N' <IMG SRC="cid:check16" ALT="Yes">' +N' <IMG SRC="cid:x16" ALT="No">' +N' --boundary' +N' Content-Location: CID:somethingelse ; this header is disregarded' +N' Content-ID: <check16>' +N' Content-Type: IMAGE/GIF' +N' Content-Transfer-Encoding: BASE64,R0lGODlhEAAQAPcAAAAAABG3JBK2Jhe9Khi+KyjOOyrQPS3RPj7iT////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAP8ALAAAAAAQABAAAAhiAP8JHIigIIKBCAkaXJhQIIIDBSJKLGAgIYKJGCMShJhxYgCHHSUm0FgwZIGREQOU7Igy5UqMCVoWUHkRpsyZ/y7GjLgTI8iTMW8WEDBQZM+JCUVm/JhwQEYCDREGmMoUYUAAOw==' +N' --boundary-N' --boundary' +N' Content-Location: CID:something@else ; this header is disregarded' +N' Content-ID: <x16>' +N' Content-Type: IMAGE/GIF' +N' Content-Transfer-Encoding: BASE64,R0lGODlhEAAQAPcAAAAAAMcKAMYMAM0QAN4hEOAjEuEjFfI0Jv///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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