如何发送带有超链接

时间:2016-08-21 05:35:37

标签: email hyperlink

我要求在邮件中获取带有接受或拒绝锚点的超链接。现在,我需要发送带有超链接的电子邮件。我尝试了很多次但未能获得超链接。怎么做?

public void SendEmail(OEMaster oe, int actionType, string accept)
{
  try
      {
         string mailTo = string.Empty;
         string mailFrom = string.Empty;
         string mailCC = string.Empty;
         string mailSubject = string.Empty;

         string mailMessage = "Dear Concern,";
         mailMessage += "";
         mailMessage += "";

   switch (actionType)
   {
  case 1:
       #region Mail Body
       mailSubject = "Advance Expense Request.";
       mailTo = oe.Approver.Email; // this.GetEmailAddress(oe.ApproverID);
       mailMessage += string.Format("Request for Accept");
       mailMessage += "";
       mailMessage += "";
       mailMessage += "The Details are as follows:";
       mailMessage += "";
       mailMessage += "";
       mailMessage += "Employee: " + oe.Employee.Name;
       mailMessage += "";
       mailMessage += "";
       mailMessage += "Amount: " + oe.Amount;
       mailMessage += "";

      mailMessage += "<a href='http:www.google.com" +accept + "'></a>";

endregion

中断;

1 个答案:

答案 0 :(得分:0)

该行

mailMessage += "<a href='http:www.google.com" +accept + "'></a>";

 mailMessage += "<a href='http://www.google.com/" +accept + "'></a>";