English 中文(简体)
如何使用蚊帐(c#)在违约邮件客户中制作带有嵌入图像的超文本电子邮件?
原标题:How to create HTML email with embeded image and show it in the default mail client using .net (c#)?

If you look at the Snip tool in windows there is an option to send the snip as an embedded attachment in the default mail client (I guess as an html email). I need exactly that.

目前,我正在使用简单的MAPI来照搬图像,但不允许涂层。

One key requirement is that it should be created and then shown in the default mail client. I don t think I can use System.Net.Mail for that. Or can I?

其使用c#的WPF申请。

EDIT:请在答复之前仔细阅读问题。 我没有这样做。 我知道,如何在不诉诸黑客的情况下,在不受管理的法典中做到这一点。 我需要一个有管理的同等机构。 我是not,寻找 ha子,并乐于在必要时花大量时间寻找正确的解决办法。

问题回答

I do not think that in mailto you can embed images Please refer to the RFC 2368. It says that mailto purpose is only for short text messages and not for MIME bodies

   The special hname "body" indicates that the associated hvalue is the
   body of the message. The "body" hname should contain the content for
   the first text/plain body part of the message. The mailto URL is
   primarily intended for generation of short text messages that are
   actually the content of automatic processing (such as "subscribe"
   messages for mailing lists), not general MIME bodies.

使用过程。 开始采用壳牌出口办法:

mailto:email@domain.com?subject=your+file&body=see attachment&attachment="C:path	ofile.txt"

我不相信这条路上的引语。

<><>Edit>/strong>

还有一个应当发挥作用的解决办法。

  1. Create a HTML email using MailMessage
  2. Save it using the answer here as XXXX.eml
  3. Use ShellExecute option with Process.Start the open the EML file.

它应在缺席的电子邮件客户中开放。

我认为,你可以使用名称空间系统的课程。 邮局 这需要相当一部分工作。 我将把它留给读者。

rel=“nofollow”>RFC2111,带有嵌入图像的超文本电子邮件只是存储超文本的电子邮件和2个不同内容的图像附录。

 From: foo1@bar.net
 To: foo2@bar.net
 Subject: A simple example
 Mime-Version: 1.0
 Content-Type: multipart/related; boundary="boundary-example-1";
               type=Text/HTML

 --boundary-example 1
 Content-Type: Text/HTML; charset=US-ASCII

 ... text of the HTML document, which might contain a hyperlink
 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--

关键的一点是,在您的超文本电子邮箱中,你不使用固定的URL途径,而是用“酸:xxxxx”表示,Xxxxx是你的内容。 rel=“nofollow”>RFC2111,详见有关ID的内容。 从我对该系统的看法来看。 邮电网,使你能够用IsBodyHtml房地产制作邮件。 然后,你需要做的下一个事情是给这一邮件收留。 附文当然是你固有的形象。 然后,你需要记住,要确定随员的内容。 因此,为了确保你的超文本电子邮件能够提及正确的内容信息数据库,这些内容应当发挥作用。

我再次证实自己,但我对我的一些带有嵌入图像的电子邮件进行了快速检查。 我确实看到了带有酸cid的电子邮件:xx是图像来源,我的《展望》客户可以实际开销。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签