Embed HTML table in email

前端 未结 5 2146
攒了一身酷
攒了一身酷 2021-02-14 11:16

Is it possible to send a table (coded in html) as the body of an email so that the recipient is able to view the table (parsed and displayed).

For example, I want to be

5条回答
  •  遥遥无期
    2021-02-14 12:10

    You can not directly use HTML or Body tag when you embedding HTML in c# string as it already going to display inside HTML Page. Below is a simple table format.

            body += ""
            
            body += ""
            body += ""
            body += ""
            body += ""
            body += ""
            body += ""
            body += ""
            body += ""
            body += ""
            body += ""
            body += ""
            body += ""
            body += ""
            body += ""
            body += ""
            body += ""
            body += ""
            body += ""
            body += ""
            body += ""
            body += "
    Name : " + Name + "
    Application ID :" + ApplicationID + "
    Passport No :" + PassportNo + "
    Voucher No. :" + VoucherNo + "
    Date : " + PDate + "

    "

    You can also do styling like below

    Example

    body+="Hello World!"
    

提交回复
热议问题