问题相关上传简历 [英] question realated upload resume
本文介绍了问题相关上传简历的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在制作简历上传页面,其中我想在asp.net c#
i am making resume upload page in which i want to send resume on gmail account(another person gmail account) in asp.net c#
推荐答案
的gmail帐户(另一个人gmail帐户)上发送简历试试这个:
首先,包括这个命名空间:
try this:
first, include this namespace:
using System.Net.Mail;
然后创建电子邮件功能:
then create an Email function:
void Email(string receiversname) //email to client
{
MailMessage MyMailMessage = new MailMessage();
MyMailMessage.From = new MailAddress("youremail@gmail.com", "your title");
MyMailMessage.To.Add(eadd);
MyMailMessage.Subject = "your e-mail subject";
MyMailMessage.IsBodyHtml = true;
MyMailMessage.Body = "<body bgcolor=\"#F5F5F5\"><center><font face="\"Cambria\"">
<pre lang="text">Note you can add more MyMailMessage.body here for the content of the email
SmtpClient SMTPServer = new SmtpClient("smtp.gmail.com");
SMTPServer.Port = 587;
SMTPServer.Credentials = new System.Net.NetworkCredential("your email here", "your email's password");
SMTPServer.EnableSsl = true;
try
{
SMTPServer.Send(MyMailMessage);
}
catch (Exception ex)
{
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + ex.Message + "');", true);
}
现在开启你的发送按钮点击事件,
输入以下代码:
now on your send button click event,
enter the following code:
receiversname= txtEmail.Text.ToString();
Email(receiversname);
这篇关于问题相关上传简历的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文