c#mailmessage包括正文描述和html文件

时间:2018-03-28 02:26:19

标签: c# mailmessage

如何首先包含描述,然后在发送电子邮件时显示html文件?

下面的

是我当前的代码

<?php 

    //declaring variables to null
    $f_name = $l_name = $email = '';
    $f_nameERR = $l_nameERR = $emailERR ='';


// On submitting form below function will execute.

if ($_SERVER["REQUEST_METHOD"] == "POST") {

if (empty($_POST["fname"])) {
$f_nameERR = "<div class='alert alert-danger alert-dismissible' role='alert'><button type='button' class='close' data-dismiss='alert' aria-label='Close'><span aria-hidden='true'>&times;</span></button>First name is required </div>";
} else {
$f_name = $_POST["fname"];
}


if (empty($_POST["lname"])) {
$l_nameERR = "<div class='alert alert-danger alert-dismissible' role='alert'> <button type='button' class='close' data-dismiss='alert' aria-label='Close'><span aria-hidden='true'>&times;</span></button>Last Name is required </div>";
} else {
$l_name = $_POST["lname"];
}

if (empty($_POST["email"])) {
$emailERR = "<div class='alert alert-danger alert-dismissible' role='alert'><button type='button' class='close' data-dismiss='alert' aria-label='Close'><span aria-hidden='true'>&times;</span></button>Email Address is required </div>";
} else {
$email = $_POST["email"];
}


}
     ?>

预期结果电子邮件内容

https://ibb.co/cEFbN7

0 个答案:

没有答案