本文介绍了嗨,我正在使用C#在asp.net中发送包含用户名和密码的邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我使用c#.. asp发送包含用户名和密码以及asp.net中的一些文本的邮件,它工作正常,但是我的问题是我必须更改该邮件中用户名和密码的颜色和字体大小. ..plss提前帮助我表示紧急的感谢
在我的代码中


hi i m sending mail which contains username and password along with that some text in asp.net using c#..its working perfectly but my problem is that i have to change the colour and font size of username and password in that mail...plss help me out its urgent thanks in advance
here in my code for that


public void sendmail()
   {
       // Gmail Address from where you send the mail
       var fromAddress = [email protected]";
       // any address where the email will be sending
       var toAddress = Email.Text.ToString();
       //Password of your gmail address
       const string fromPassword = gdfgfg;
       // Passing the values and make a email formate to display
       string subject = "Phd / Msc Engg Candidate Status";
      
       string usrname = LoginID.Text.ToString();
       TextBox1.Text = usrname.ToString();
       string usrname1 = TextBox1.Text.ToString();

     
       string pass = pas1;
       TextBox2.Text = pass.ToString();
       string pass1 = TextBox2.Text.ToString();

       string body = "Dear Sir/Madam,\n\n";
       body += " Kindly Requesting To Check your PhD.D/Msc Engg Candidate status, Please find the following steps\n";
       body += "1)  --   \n";
       body += "--Please paste this URL in the Browser and enter the following Username and password\n";
       body += "\n";
       body += "2) User Name:: " + usrname1 + "\n";
       body += "\n";
       body += "      Password:: " + pass1 + "\n";
       body += "\n";
       body+="3) Select the candidate in the search candidates and check the Status \n";
       body += "\n";
       body += "4) Please leave your feedback or Queries at [email protected]\n";
       body += " Kind attention::-- Please use the Latest Version Browser (Ex- Mozilla, Firefox, IE 7.0) for the better output \n";
       body += "\n";
       body += "\n";
       body += "Thanks & Regards \n";
       body += " PhD Admin\n";
       //body += "Question: \n" + Comments.Text + "\n";
       // smtp settings
       var smtp = new System.Net.Mail.SmtpClient();
       {
           smtp.Host = "smtp.gmail.com";
           smtp.Port = 587;
           smtp.EnableSsl = true;
           smtp.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;
           smtp.UseDefaultCredentials = true;
           smtp.Credentials = new NetworkCredential(fromAddress, fromPassword);
           smtp.Timeout = 20000;
           //smtp.EnableSsl = true;
       }
       // Passing values to smtp object

       smtp.Send(fromAddress, toAddress, subject, body);
   }


在这里,我想更改用户名和密码的颜色和字体,请事先帮助我.


here i want to change the colour and font of User Name and password plss help me out thanks in advance

推荐答案

Please use the Latest Version Browser (Ex- Mozilla, Firefox, IE 7.0) for the better output


这篇关于嗨,我正在使用C#在asp.net中发送包含用户名和密码的邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-22 18:15