通过电子邮件将书面文本发送给Wysiwyg时出错

时间:2018-08-07 10:11:53

标签: javascript html asp.net-mvc

基本上,我写文本并正确发送所有内容。问题是当我收到此电子邮件时,它是HTML中的键入类型。例如...如果我写谢谢! ...并发送电子邮件...在阅读我发送的电子邮件时...会被标记...我总是收到类似这样的信息:<p> Thanks! b> Thanks! </ b>。我的目标是只接收文本,而没有标签。

查看

<link href="http://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.9/summernote.css" rel="stylesheet">
@using (Html.BeginForm("Index", "Email", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
    <div class="box box-info">
        <div class="box-body">
            <div class="form-group">
                <input class="form-control" type="email" name="Destinatário" placeholder="Para:">
            </div>
            <div class="form-group">
                <input class="form-control" name="Assunto" placeholder="Assunto:">
            </div>
            <div class="form-group">
                <textarea id="summernote" name="Mensagem" class="form-control" style="height: 200px" placeholder="Introduza a Mensagem..."></textarea>
            </div>
            <div class="form-group">
                <div class="btn btn-default btn-file">
                    <i class="fa fa-paperclip"></i> Anexo
                    <input type="file" name="Attachments" multiple="multiple">
                </div>
                <p class="help-block">Max. 32MB</p>
            </div>
        </div>
        <div class="box-footer">
            <div class="pull-right">
                <button type="button" onclick="location.href='@Url.Action("DashboardV1", "Home")'" class="btn btn-default"><i class="fa fa-pencil"></i> Voltar</button>
                <button type="submit" class="btn btn-primary"><i class="fa fa-envelope-o" id="sendEmail"></i> Enviar</button>
            </div>
            <button type="reset" class="btn btn-default"><i class="fa fa-times"></i> Limpar Tudo</button>
        </div>
    </div>

}

@section Scripts {
    <script src="http://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.9/summernote.js"></script>
    <script type="text/javascript">
        var message = "@ViewBag.Message";
        $(function () {
            if (message != "") {
                alert(message);
            }
        });
    </script>
    <script>
        $(document).ready(function () {
            $('#summernote').summernote();
        });
    </script>
}

0 个答案:

没有答案