英文:
Golang AWS SES email bad sender
问题
我正在使用 AWS SES SDK 来进行 Golang 开发,它按计划工作,但我唯一的问题是,当我从 hi@domain.com 发送邮件时,在邮件的“发件人”位置上我看到的是“hi”,而不是我更喜欢的域名。我似乎找不到一个简单的解决方法。有人遇到过这个问题吗?我认为应该有一个简单的方法来解决这个问题。我的代码几乎与 SDK 中链接示例的代码相同。
英文:
I am using the AWS SES SDK for Golang and it works as planned, but the only issue I have is that I send my emails from hi@domain.com so when the email is received in the from
place I see hi
instead of the domain name which I would prefer and I can't seem to find an easy fix for it. Has anyone encountered this? I think there should be an easy way to solve the issue. My code is almost identical to the linked sample in the SDK.
答案1
得分: 1
在提供FromEmailAddress
时,尝试使用以下格式:Nice sender name <sender@example.com>
,这样你可以拥有域名,你可以这样写:
fromEmailAddress := "Example.com <sender@example.com>"
sesv2.SendEmailInput {
FromEmailAddress: &fromEmailAddress,
}
英文:
While providing FromEmailAddress
in SendEmailInput struct try to use the following format Nice sender name <sender@example.com>
, so to have the domain name you could have:
fromEmailAddress := "Example.com <sender@example.com>"
sesv2.SendEmailInput {
FromEmailAddress: &fromEmailAddress,
}
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论