ASP.net的电子邮件概念 [英] Email Concept of ASP.net

查看:97
本文介绍了ASP.net的电子邮件概念的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我没有获得实现此概念的正确代码.

我在aspx页面中有四个文本框和一个按名称提交的按钮,一个来自文本框,第二个是文本框,第三个是主题文本框,最后一个是主体文本框.

当用户单击提交"按钮时,邮件应转到特定的电子邮件地址,如果我们已将其从特定"地址分配到收件人"文本框中,则应将其分配给从"文本框中的邮件.

我想知道实现此概念的不同方法.

谢谢,
Swapna.

Hi,
I am not getting the correct code to implement this concept.

I have four textboxes and one button by name submit in my aspx page,one is from textbox,2nd is to textbox,3rd is subject textbox and last one is body textbox.

When user clicks on submit button mail should go to the particular email address were we have assigned it in the to textbox from the particular address were we have assigned it in the from textbox.

I want to know different methods to implement this concept.

thanks,
Swapna.

推荐答案

发送电子邮件 [ ^ ]和 ^ ]两者都会给您一个想法.
Sending Email[^] and Send Email in ASP.Net 2.0 Codeproject[^]both of them will give you an idea.


为清晰起见,请查看此Microsoft Video教程:
使用ASP.NET发送来自网站的电子邮件 [
Have a look at this Microsoft Video tutorial for clarity:
Use ASP.NET to send Email from Website[^]


MailMessage msg = new MailMessage();
msg.From = "email address";
msg.To = txtMailTo.Text;
msg.BodyFormat = MailFormat.Text;
msg.Subject = txtSubject.Text;
msg.Body = txtMessage.Text;
SmtpMail.SmtpServer = "your smtp mail server";
SmtpMail.Send(msg);


使用它,它可以正常工作.


Use it, it''s working fine.


这篇关于ASP.net的电子邮件概念的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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