ASP.net的电子邮件概念

编程入门 行业动态 更新时间:2024-10-21 18:41:46
本文介绍了ASP的电子邮件概念的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我没有获得实现此概念的正确代码. 我在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.

推荐答案

发送电子邮件 [ ^ ]和在ASP.Net 2.0 Codeproject中发送电子邮件 [ ^ ]两者都会给您一个想法. 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的电子邮件概念

本文发布于:2023-11-16 09:57:10,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1603247.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:电子邮件   概念   ASP   net

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!