在我的asp.net网站上,我想发送带有附件的邮件 [英] In my asp.net site i want to send a mail with attachments

查看:94
本文介绍了在我的asp.net网站上,我想发送带有附件的邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的asp.net网站上,我想发送带有附件的邮件.

我的代码
.......................

 DataSet ds =  DataSet();
               MailMessage mail1 =  MailMessage();
               mail1.From = txtemail.Text;
               ds.ReadXml(Server.MapPath(" )));
               mail1.To = ds.Tables [ 0 ].rows [ 0 ] ["  + txtemail.Text + "  + "  + txtfname.Text + txtlname.Text +   \ n" + "  + lblpost.Text;
               SmtpMail.SmtpServer.Insert( 0 " );



               SmtpMail.Send(mail1);



在这里我想要的是一件事,我想用这封邮件发送生物数据.

请帮助我
现在邮件是
..........
例如:

发送者:samle@gmail.com
姓名:samlesamle
应用程序  管理器的职位

我想在这里看到上传的生物数据
申请经理职位

解决方案

您可以将文档(生物数据)存储在服务器的物理文件夹中.在DB中,您可以使该字段指向相对位置.


In my asp.net site i want to send a mail with attachments.

My code
.......................

DataSet ds = new DataSet();
               MailMessage mail1 = new MailMessage();
               mail1.From = txtemail.Text;
               ds.ReadXml(Server.MapPath("~/Admin/xml/empmailID.xml"));
               mail1.To = ds.Tables[0].Rows[0][0].ToString();

               mail1.Body = "Sender : " + txtemail.Text + "\n" + "Name : " + txtfname.Text + txtlname.Text + "\n" + "Application " + lblpost.Text;
               SmtpMail.SmtpServer.Insert(0, "83.245.63.194");



               SmtpMail.Send(mail1);



here I want one thing that is ,i want to send biodata with this mail.

pls help me
Now the mail is
..........
eg:

Sender : samle@gmail.com
Name : samlesamle
Application for the Position of Manager



Here i want to see the uploaded biodata
Application for the Position of Manager

解决方案

You can store the document (bio data) at the physical folder of the server. In DB, you can have the field pointing to the relative location.


这篇关于在我的asp.net网站上,我想发送带有附件的邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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