none
email如何得到附件中的CSS RRS feed

  • 常规讨论

  • 类似是此网页涉及的东西http://forums.msdn.microsoft.com/zh-CN/netfxnetcom/thread/c65502fa-955e-4fa1-b409-238bbb677df7/


    我自己写的代码:
    C#:
    MailMessage _mm = SelectContext();
    /.......别的代码
                _imgPath = _mainPath + "/Email-images/e.css";
                _imgID = "ecss";
                Attachment _aCss = new Attachment(_imgPath);
                _aCss.ContentDisposition.Inline = true;
                _aCss.ContentDisposition.DispositionType = System.Net.Mime.DispositionTypeNames.Inline;
                _aCss.ContentId = _imgID;
                _aCss.ContentType.MediaType = "text/css";
                _aCss.ContentType.Name = "e.css";
                _aLine.TransferEncoding = System.Net.Mime.TransferEncoding.Base64;
    /.......别的代码
                _mm.Attachments.Add(_aCss);

    html:
    <link type='text/css' rel='Stylesheet' href='cid:ecss'/>
    2008年7月11日 9:18