如何使用asp.net c#向outlook发送电子邮件 [英] How to send email to outlook using asp.net c#

查看:136
本文介绍了如何使用asp.net c#向outlook发送电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨frnds,



我想使用asp.net发送电子邮件给outlook c#



在我的网页上我有3个文本框和按钮



ToEmail - TxtToEmail

主题 - TxtSubject

身体 - TxtBody



按钮 - BtnSendEmail



请您给我一个很好的解决方案,如何使用asp发送电子邮件.net c#



谢谢。

Hi frnds,

I want to send email to outlook using asp.net c#

on my web page I have 3 Textboxes and button

ToEmail - TxtToEmail
Subject - TxtSubject
Body - TxtBody

Button - BtnSendEmail

Please can you give me good solution, how to send email using asp.net c#

Thanks.

推荐答案

你可以通过互联网搜索找到很多例子。

这是一个例子: http://asp.net-tutorials.com / misc / sending-mails / [ ^ ]
You could find a lot of examples by searching on the internet.
Here is one example: http://asp.net-tutorials.com/misc/sending-mails/[^]


您好



请点击以下链接以供参考。



Outlook.Com SMTP主机的C#SMTP配置 [ ^ ]


由于您使用的是ASP.NET,我希望您知道可以使用WebMail类也发送电子邮件。



我写了一篇文章来解释它的用法和方法。它是一个短编码的API,您可以使用它通过传递您的凭据提供的任何服务来发送电子邮件。



使用ASP.NET助手轻松发送电子邮件 [ ^ ]



您可以使用自己的控件并调用它们的值作为参数传递,电子邮件发送方法也很短,它的整个身体发送简单的电子邮件如下



Since you're using ASP.NET I wanted you to know you can use the WebMail class to send the email too.

I have written an article to explain its usage and method. It is a short-coded API and you can use it to send the emails using any service provided by passing your credentials.

Sending emails easily using ASP.NET helpers[^]

You can use your own Controls and call their values to be passed as the Parameters, The email send method is short too, its entire body to send the simple email is like the following

WebMail.Send(to: "recipientEmail@address.com",
             subject: "Email's subject",
             body: "Email's body, describe why you wrote the email here");





电子邮件将被发送,你可以在任何地方通过你的凭证,使用WebMail类的属性。



And the email would be send, you can pass your credentials anywhere, using the Properties of the WebMail class.


这篇关于如何使用asp.net c#向outlook发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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