SendMail之间的区别

SendMail之间的区别

本文介绍了DotNetNuke.Services.Mail.Mail.SendEmail和DotNetNuke.Services.Mail.Mail.SendMail之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在DNN模块中的注册过程之后发送电子邮件。当我搜索时,我发现dnn中有一个内置的邮件类。但是它包含两种方法- SendEmail SendMail 。两者之间有什么区别?在这种情况下,我必须选择哪一个。

I want to send an email after a registration process in a DNN module. When i searched i found that there is an in-built mail class in dnn. But it contains two methods - SendEmail and SendMail. What is the difference between these two?And which one i have to opt in this case.

推荐答案

在DNN 5.3中引入了SendEmail ,大大简化了API。如果您能够使用 SendEmail 方法,我会推荐它,它比 SendMail (总是需要SMTP信息,即使它几乎总是从设置中拉出)。

SendEmail was introduced in DNN 5.3, and greatly simplifies the API. If you're able to use the SendEmail method, I would recommend it, it's much simpler than SendMail (which always requires SMTP information, even though it's almost always pulled from settings).

如果您正在寻找


  • 来自

  • to

  • 主题

  • body

  • from
  • to
  • subject
  • body

可选


  • 发件人

  • 附件

然后是 SendEmail 是您想要的。

这篇关于DotNetNuke.Services.Mail.Mail.SendEmail和DotNetNuke.Services.Mail.Mail.SendMail之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 06:29