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

问题描述

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

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

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

               mail1.Body = " 发件人:"  + txtemail.Text + "  \ n"  + " 名称:" + txtfname.Text + txtlname.Text + "   \ n" + " 应用程序"  + lblpost.Text;
               SmtpMail.SmtpServer.Insert( 0 "  83.245.63.194 ");



               SmtpMail.Send(mail1);



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

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

发送者:[email protected]
姓名:samlesamle
应用程序  管理器的职位

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

解决方案


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 : [email protected]
Name : samlesamle
Application for the Position of Manager



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

解决方案


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

10-30 01:52