amazon-web-services - Can cognito sign-in verification email contain image?
问题描述
I'm trying to figure out how to send cognito sign-in verification email:
- in the user preferred language
- in HTML with images (such as the company logo).
For the first one, I found this question and the answer suggests using Lambda triggers with custom attribute for language selection. The solution looks promising and I will definitely give it a try.
For the second one including image in email, I found base64 encoded images in email signatures which suggests two ways:
- embed image using data URI within the
<img>
tag - embed image as attachment.
I tried (1) and it works for Thunderbird email client, but not for Gmail.
Is there a way to send cognito verification email with image?
解决方案
I see that you are looking to add your company logo in the Cognito sign-in verification email. I recently did the same thing. I tried to use base64 encoded image but the encoded value was pretty big and it's hard to maintain that.
However, the simpler way would be to store the image in online storage and use the image link for img src
.
<a href='https://your_company_address.com'><img src="https://s3bucket_folder.s3.amazonaws.com/uploads/your_company_log.png" width= "40%" align= "center"/></a>
Hope it helps.
推荐阅读
- windows - 使用 ElectronJS 应用程序获取 IntelliJ IDEA/Android Studio 打开的项目文件夹
- java - 运行基于 Java 的开源
- google-apps-script - 如何在 Google App Script 中创建可重复使用的 showModalDialog()?
- javascript - 如何在字符串中找到子字符串并删除其中的 ,(逗号)?
- swift - 如何在 SwiftUI 中的 Preview 提供程序中初始化数据
- ssas - 在 SSAS 中创建计算度量
- optimization - 有什么方法可以让 Z3 使用多核(多线程)来解决大问题?
- java - @OneToMany 与 @JoinTable 的关系
- python - “Registered_Courses”对象没有属性“course_set”Django
- javascript - 如何在传单中实时制作线串,每个点都有标记?