WebMail.Send(to: companyEmail,
subject: "Message From - " + firstName +" "+ lastName,
body: "<table>"+
"<tr>"+
"<td>Email"+"</td>"+
"<td>"+email+"</td>"+
"</tr>"+
"<tr>"+
"<td>Phone"+"</td>"+
"<td>"+phone+"</td>"+
"</tr>"+
"<tr>"+
"<td>Message"+"</td>"+
"<td>"+message+"</td>"+
"</tr>"+
"</table>" // This works just fine
但我想在该表中添加一个类。说一个bootstrap类&#34; table table-striped&#34;。以下没有运行。有帮助吗?如何正确添加该类?谢谢
WebMail.Send(to: companyEmail,
subject: "Message From - " + firstName +" "+ lastName,
body: "<table class="table table-striped">"+
"<tr>"+
"<td>Email"+"</td>"+
"<td>"+email+"</td>"+
"</tr>"+
"<tr>"+
"<td>Phone"+"</td>"+
"<td>"+phone+"</td>"+
"</tr>"+
"<tr>"+
"<td>Message"+"</td>"+
"<td>"+message+"</td>"+
"</tr>"+
"</table>"
);
答案 0 :(得分:0)
您需要使用"
\"
个字符
body: "<table class=\"table table-striped\">"+