如何在不需要安装Outlook的情况下阅读电子邮件并将电子邮件存储到数据库表 [英] How Can I Read Emails Without Need To Install Outlook And Store The Emails To Database Tabel

查看:115
本文介绍了如何在不需要安装Outlook的情况下阅读电子邮件并将电子邮件存储到数据库表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Dears

问候!!!



如何在不需要安装Outlook的情况下阅读电子邮件并将电子邮件存储到数据库表格中c#CODE

解决方案

如果您以后运行的是Exchange 2010,可以查看使用EWS。



< a href =https://msdn.microsoft.com/en-us/library/office/dd877012(v=exchg.150).aspx> https://msdn.microsoft.com/en-us/library/ office / dd877012(v = exchg.150).aspx [ ^ ]


您可以通过简单地将电子邮件生成为HTML格式来获得解决方案。

并将这些HTML转储到数据库表中。并根据需要在浏览器或任何html编辑器中阅读。



数据库表可以有字段,如



 EMAIL_ID,EMAIL_FROM,EMAIL_TO,EMAIL_CC,EMAIL_BCC,EMAIL_SUBJECT,
EMAIL_BODY,EMAIL_GENERATEDON,ISEMAILSENT,EMAIL_SENTON,EMAIL_LASTSENT_ATTEMPT,
EMAIL_ATTEMPT_CNT,MAILTYPE











以下是Email-Templet格式示例在HTML中(你也可以在Message Body字段中有纯文本,在我的情况下我使用HTML格式)



关于文件附件你可以保存附件文件路径表和使用Code提供该路径作为附件



.tdborders {border:solid 1px#FFD5AA;}。tdheaddata {background-color:#FFF8F0; font-weight :bold; font-family:Verdana; font-size:11px; border:solid 1px#FFD5AA;}。rowcolor {background-color:#FFF8F0;}。rowwhite {background-color:#FFFFFF;}< body style = 'font:13px Verdana'&g t;

亲爱的XYX,

你的完整留言Para - 1,
Para - 2.

具体信息:描述
< br>



谢谢和问候, < br>


< /体>< / HTML>

Dears
Greetings!!!

how can i read emails without need to install outlook and store the emails to database tabel in c# CODE

解决方案

If you are running Exchange 2010 later you can look at using EWS.

https://msdn.microsoft.com/en-us/library/office/dd877012(v=exchg.150).aspx[^]


You can have your solution by Simply generating your Email into HTML Format.
and Dump those HTML into Database table. and Read it in Browser or any html Editor as you wish.

A DB Table can have Fields such as

EMAIL_ID,   EMAIL_FROM, EMAIL_TO,   EMAIL_CC,   EMAIL_BCC,  EMAIL_SUBJECT,
EMAIL_BODY, EMAIL_GENERATEDON,  ISEMAILSENT,    EMAIL_SENTON,   EMAIL_LASTSENT_ATTEMPT,
EMAIL_ATTEMPT_CNT,  MAILTYPE






Below is the Sample of Email- Templet Format in HTML (you can also have plain text in Message Body field, in my case i am using HTML format)

Regarding File attachment you can save the attachment file path in Table and by using Code provide that path as attachment

.tdborders{border: solid 1px #FFD5AA;}.tdheaddata{background-color: #FFF8F0;font-weight: bold;font-family: Verdana;font-size: 11px;border: solid 1px #FFD5AA;}.rowcolor{background-color:#FFF8F0;}.rowwhite{background-color:#FFFFFF;}<body style='font: 13px Verdana'>

Dear XYX,

Your Full Message Para - 1,
Para - 2.

Specific message : Description





Thanks & Regards,


Note: Any specific instruction to be mentione if needed (e.g Electronic generated E-Mail, Go Green, Print instruction, Email Privacy etc).

</body></html>


这篇关于如何在不需要安装Outlook的情况下阅读电子邮件并将电子邮件存储到数据库表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆