使用C#Windows的带邮件消息模板的Outlook2007 [英] outlook2007 with mailmessage template using C# windows

查看:96
本文介绍了使用C#Windows的带邮件消息模板的Outlook2007的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

C#代码可用于发送电子邮件-每天最多100封电子邮件,但是,我想在代码中同时在电子邮件中添加特定的用户详细信息.
例如,它应显示为类似

亲爱的[人的名字],感谢您参加[日期]在[地点]举行的活动,如有任何反馈,请给我们发送电子邮件..... etc''

其中[人名],[日期]和[地点]是表格中保存的数据.
我说得通吗?
包含电子邮件地址/名称/日期等的数据库存储在SQL Server2008中,并且我在Microsoft Outlook 2007中使用C#Windows表单代码.

那么如何使用数据库字段(>)制作电子邮件模板.我将在Outlook2007中将其添加到mailmessage正文中.
任何帮助/信息都是伟大的!

在此先感谢

C# code which works in mailing out emails - up to 100+ emails per day- however, I would like to the code where it also added specific user details in the email.
For example, it should read some like

''Dear [person''s name], thanks for taking part in the event held on the [date] at [venue], please email us with any feedback.....etc''

where the [person''s name], [date] and [venue] is data held in a table.
Am I making sense?
The database holding the email address/names/dates etc is stored in a SQL Server2008, and I m using C# windows forms code within Microsoft Outlook 2007.

so how to make email template with database fields(<<name>>,<<date>>).which i will add to mailmessage body in the outlook2007

Any help/information would be grand!!

Thanks in advance

推荐答案

能正常工作的C#代码...

不,它在这里不能这样工作.

这是询问者的期望:
1. 先尝试您要做什么!您可能会发现它并不难.
2.制定看起来像问题/无法解决的问题.

试试看,告诉他们是否遇到问题.
成员将很乐意为您提供帮助.
C# code which works...

No. It does not work like this here.

Here is what is expected of enquirers:
1. TRY first what you want to do! You may find that it''s not that hard.
2. Formulate what was done by you that looks like an issue/not working.

Try them and tell if you face issues.
Members will be more than happy to help like this.


1)编写可以发送电子邮件程序包的代码.那将成为Send()方法...
2)编写代码以加载您的电子邮件模板并替换各个信息,然后通过步骤1中编写的方法发送电子邮件.
3)编写代码,以遍历您要向其发送邮件的数据库中的所有记录.对于找到的每个项目,请通过步骤2中编写的方法进行处理.
4)返回编写代码时发现的任何特定问题.
1) Write code that can send an email package. That will become a Send() method...
2) Write code that loads your email template and substitutes the individual information and then sends the email via the method(s) written in step 1.
3) Write code that loops through all the records from your database to which you want to send mail. For each item you find, process them through the method(s) written in step 2.
4) Come back with any specific issues you find while writing the code.


这篇关于使用C#Windows的带邮件消息模板的Outlook2007的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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