- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
当我使用 Postal 使用 Layout 发送电子邮件时,似乎没有解析标题并将其包含在邮件消息中。
View /电子邮件/_ViewStart.cshtml
@{ Layout = "~/Views/Emails/_EmailLayout.cshtml"; }
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>ViewEmails</title>
</head>
<body>
<div>
@RenderBody()
</div>
</body>
</html>
To: @ViewBag.To
From: @ViewBag.From
Subject: Reset Password
Views: Html
Content-Type: text/html; charset=utf-8
Here is your link, etc ...
@RenderSection("Headers", false)
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>ViewEmails</title>
</head>
<body>
<div>
@RenderBody()
</div>
</body>
</html>
@section Headers {
To: @ViewBag.To
From: @ViewBag.From
Subject: Reset Password
Views: Html
}
@section Headers {
Content-Type: text/html; charset=utf-8
}
Here is your link, etc ...
最佳答案
一种选择是使用 Razor 部分。
在布局的顶部添加:
@RenderSection("Headers")
@section Headers {
To: @ViewBag.To
From: @ViewBag.From
Subject: Reset Password
Views: Html
}
关于asp.net-mvc - 使用 Postal MVC 与布局解析标题作为邮件正文,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23154829/
我想在数据库中存储英国邮政编码。存储那些没有空格的邮政编码可以吗? 最佳答案 可以存储不带空格的邮政编码,但绝对建议在显示/输出时正确格式化它们。 您可以查看邮政编码的允许格式 here .空格后始终
如果用户没有用空格写邮政编码,有没有办法知道在英国邮政编码中空格必须在哪里? 例如,如果输入是:EC1A1BB, W1A0AX, M11AE, B338TH, CR26XH, DN551PT那么输出必
关闭。这个问题是off-topic .它目前不接受答案。 想改善这个问题吗? Update the question所以它是 on-topic对于堆栈溢出。 9年前关闭。 Improve this q
我不想重新发明轮子。 是否有人知道在加拿大邮政的“查找邮政编码”页面中使用 php/curl 代码填充地址数据http://www.canadapost.ca/cpotools/apps/fpc/pe
我有两个分离的组件在一个页面上运行,并且希望使用 Postal.js 在单击一个组件到另一个组件时发送消息。 当单击第一个组件时,它会发布帖子: postal.publish({ channel:
我正在尝试使用 Postal 从我的 Gmail 帐户发送电子邮件: dynamic email = new Email("Appointment"); email.To = "sergiotapia
我在跑 Postal from a service .我的@Message 有 html。 @Html.Raw 不可用。当 Postal 运行我的模板化 View 时,我得到 HtmlEncoded
我一直在尝试在我的 MVC5 网站上使用 Postal。当我托管我的网页时,一个子站点即 http://localhost/Subsite我收到错误信息 虚拟路径“/”映射到另一个应用程序,这是不允许
当我使用 Postal 使用 Layout 发送电子邮件时,似乎没有解析标题并将其包含在邮件消息中。 View /电子邮件/_ViewStart.cshtml @{ Layout = "~/Views
我正在尝试在我的reactJs站点中使用postal.js订阅/发布数据,我目前正在这样做。谁能告诉我如何推送选定的 id,我认为 loadContacts 方法正在将值重置为 false: 这是我的
我的项目托管在 Azure 上,我想每天早上向忘记完成应用程序中某些任务的用户发送一封电子邮件。 我已经建立了电子邮件(使用邮政发送)。如果我运行该函数本身,电子邮件将按预期发送。 我已将 Azure
我正在使用此 API 调用 Google Maps 来获取邮政编码的纬度和经度 http://maps.googleapis.com/maps/api/geocode/json?address=234
有几种技巧可以在移动设备上为 HTML 5 输入(即 标签)显示不同的键盘。 例如,有些记录在 Apple 的网站上,Configuring the Keyboard for Web Views .
我在项目中使用 POSTAL MVC 时遇到问题。我的托管服务公司要求我在代码中而不是在 Web 配置中设置 smtp 客户端配置。 怎么做? 希望有人能给我一个解决方案 谢谢。 最佳答案 我遇到了同
在加拿大的许多政府网站上,他们有一个功能,他们只能通过邮政编码和街道名称知道您的地址。 当你在谷歌地图上搜索邮政编码时,这个邮政编码所覆盖的区域就被覆盖了。 但是查看 google map API,我
我是一名优秀的程序员,十分优秀!