我想在单击按钮时将文本框值发送到特定的电子邮件地址. [英] I want to send textbox value to a specific email address when the button is clicked.

查看:63
本文介绍了我想在单击按钮时将文本框值发送到特定的电子邮件地址.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个Windows应用程序,其中包含一个由C#编写的文本框和一个按钮.现在我想在单击按钮时将该文本框值发送到特定的电子邮件地址.但是我对此一无所知,因为我C#中的新功能.但是我的项目中非常需要此功能.我该如何帮助任何人帮助我.

I am trying to create an windows application which have a textbox and a button by C#.Now I want to send that textbox value to a specific email address when the button is clicked.But i have no idea about this because i am new in C#.But it is badly needed in my project.How can i do that pleace anyone help me.

推荐答案

容易做到.

您将需要对System.Net的引用,并且将使用System.Net.Mail命名空间中的类(这些类是MailMessage和SmtpMail).随身携带您的SMTP凭据.

到达那里后,您会发现它非常简单. Google上(以及CP上)也有大量的帮助.

干杯.
This is fairly easy to do.

You''ll need to have a reference to System.Net and you''ll be using the classes in the System.Net.Mail namespace (classes are MailMessage and SmtpMail). Have your SMTP credentials handy.

Once you get in there you''ll find it''s very straightforward. There''s also tons of help on Google (and here on CP).

Cheers.


这篇关于我想在单击按钮时将文本框值发送到特定的电子邮件地址.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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