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.