Can an HTML email body reference a file sent as an attachment (in the same email)?

后端 未结 1 1407
不知归路
不知归路 2020-12-05 15:17

Can an HTML email use an image attachment as the source for tag?

Let\'s say I am sending an email with per-email specific images - and they are sent as an attachme

相关标签:
1条回答
  • 2020-12-05 15:52

    No hacks needed. Use the cid: URI scheme

     --boundary-example 1
     Content-Type: Text/HTML; charset=US-ASCII
    
     to the other body part, for example through a statement such as:
     <IMG SRC="cid:foo4*foo1@bar.net" ALT="IETF logo">
    
     --boundary-example-1
    
     Content-ID: <foo4*foo1@bar.net>
     Content-Type: IMAGE/GIF
     Content-Transfer-Encoding: BASE64
    
     R0lGODlhGAGgAPEAAP/////ZRaCgoAAAACH+PUNvcHlyaWdodCAoQykgMTk5
     NSBJRVRGLiBVbmF1dGhvcml6ZWQgZHVwbGljYXRpb24gcHJvaGliaXRlZC4A
     etc...
    
     --boundary-example-1--
    
    0 讨论(0)
提交回复
热议问题