<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Email on PlumePHP</title><link>https://plumephp.com/tags/email/</link><description>Recent content in Email on PlumePHP</description><generator>Hugo</generator><language>zh-CN</language><lastBuildDate>Mon, 03 Jun 2024 10:31:00 +0800</lastBuildDate><atom:link href="https://plumephp.com/tags/email/index.xml" rel="self" type="application/rss+xml"/><item><title>Go 邮件模板入门：把验证码和通知邮件渲染清楚</title><link>https://plumephp.com/go-email-template-rendering-2024/</link><pubDate>Mon, 03 Jun 2024 10:31:00 +0800</pubDate><guid>https://plumephp.com/go-email-template-rendering-2024/</guid><description>&lt;p&gt;邮件模板听起来像前端工作，但后端经常要负责生成验证码、邀请链接、账单通知和任务提醒。很多初学项目一开始直接用 &lt;code&gt;fmt.Sprintf&lt;/code&gt; 拼 HTML，写到第二封邮件时就会变得难维护。Go 的 &lt;code&gt;html/template&lt;/code&gt; 很适合渲染 HTML 邮件，因为它会自动转义用户数据。&lt;/p&gt;</description></item></channel></rss>