简体   繁体   English

使用delphi 2010进行备用电子邮件呈现

[英]Alternative Email rendering using delphi 2010

I have some problems with some customers, in my application I use Simple MAPI to render an email to outlook, but with some customer they have problems with the mail functions, I have the feeling that MAPI is not really a good way to render an email, so I have been starting to think if there are any alternative ways to render an email to send to the default email client. 我与某些客户有一些问题,在我的应用程序中,我使用简单的MAPI将电子邮件呈现到Outlook,但是对于某些客户,他们在邮件功能方面存在问题,我感到MAPI并不是呈现电子邮件的好方法,因此我开始考虑是否有其他方法可以呈现电子邮件以发送到默认电子邮件客户端。

I know for use a shellexecute mailt:recepient@email.com will work and applying &sbject="test" etc etc, but shellexecute is not really the way I want to do it either.. 我知道可以使用shellexecute mailt:recepient@email.com并应用&sbject =“ test”等,但是shellexecute并不是我想要的方式。

do I have any third option to render an email sending to the default mail client? 我有什么第三种选择来呈现发送到默认邮件客户端的电子邮件?

other than body I will also be needed to send with attachments as well 除了身体,我也将需要发送附件

+some customers also use citrix distributed applications, which also need to be allowed to send emails +一些客户还使用citrix分布式应用程序,还需要允许其发送电子邮件

Based on two other articles on the web, I put together 根据网上的其他两篇文章,

How can I simulate 'Send To…' with Delphi? 如何用Delphi模拟“发送到……”?

It simulates the Explorer context menu item "Send to ... | Mail recipient" behavior. 它模拟资源管理器上下文菜单项“发送到... |邮件收件人”的行为。 It will open a new message draft in the default mail client, with the selected file(s) already attached. 它将在默认邮件客户端中打开一个新的邮件草稿,其中已包含所选文件。

It is very likely that it uses MAPI behind the scenes, but instead of using the API directly it uses the existing service of the operating system (which might solve the problem). 它很可能在后台使用MAPI,但不是直接使用API​​,而是使用操作系统的现有服务(这可能会解决问题)。

Both the Indy components as the ICS components from F. Piette support sending emails through the SMTP protocol, which would be practical for users without Outlook or other MAPI-enabled mailclient. 来自F.Piette的ICS组件中的两个Indy组件均支持通过SMTP协议发送电子邮件,这对于没有Outlook或其他启用MAPI的邮件客户端的用户来说非常实用。 Or users with a faulty Outlook version. 或用户使用错误的Outlook版本。 However, in these cases they won't have those emails in their mail client so I would advise you to add this as an alternate option in your application. 但是,在这些情况下,他们的邮件客户端中不会包含这些电子邮件,因此我建议您在应用程序中将其添加为备用选项。
This means that by default, your application will use MAPI. 这意味着默认情况下,您的应用程序将使用MAPI。 Users who have troubles with this should go to the configuration for your application and provide additional settings to send emails through SMTP instead. 对此有麻烦的用户应转到应用程序的配置,并提供其他设置以通过SMTP发送电子邮件。
And yes, both Indy and ICS will support adding attachments to your outgoing emails. 是的,Indy和ICS都将支持在您的外发电子邮件中添加附件。 Also, you can store those emails on disk with a *.eml extention and then most mailclients will be able to import them. 另外,您可以将这些电子邮件以* .eml扩展名存储在磁盘上,然后大多数mailclient都可以导入它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM