mosn / layotto

A fast and efficient cloud native application runtime
http://mosn.io/layotto/
Apache License 2.0
817 stars 168 forks source link

Develop a new component for email API; 为 email API 开发新的组件 #836

Open seeflood opened 1 year ago

seeflood commented 1 year ago

What would you like to be added:

Develop a new component for email API.

Choose an open source component or cloud service you like to implement this API.

For example, you can choose any one in the list below:

Reference:

An example pull request :

API quickstart doc:

API reference: https://mosn.io/layotto/api/v1/email.html

API design doc/discussion: https://github.com/mosn/layotto/issues/717

chinese: 选择一个你喜欢的开源组件或云服务实现 email API 参考资料见上。

Why is this needed:

We need more components to make this API useful

alilestera commented 1 year ago

I can take a task that develop alibaba cloud email service component for email API. I'm working on it.

zhenjunMa commented 1 year ago

@alilestera email API reference: https://github.com/mosn/layotto/issues/717

alilestera commented 1 year ago

@seeflood Hi. I have checked API reference and its design discussion, but I still can't understand the meaning of the field setting_id in SendEmailRequest, which is only described "Required".

seeflood commented 1 year ago

@alilestera 我有点记不清了,翻了一下讨论记录,好像是拿来获取配置的,类似于 aws 服务里的 ConfigurationSetName https://github.com/mosn/layotto/issues/717#issuecomment-1189828948

你实现组件的时候可以看下是否一定要这个字段、是否可以改成非必填字段

alilestera commented 1 year ago

@alilestera 我有点记不清了,翻了一下讨论记录,好像是拿来获取配置的,类似于 aws 服务里的 ConfigurationSetName #717 (comment)

你实现组件的时候可以看下是否一定要这个字段、是否可以改成非必填字段

@seeflood 他们没有用到这个字段,可以改为可选字段,另外也有其他的字段可以改为可选。 对于email API来说,不同云服务提供商之间的差异也很大,相信你们当初讨论的时候就已经考虑了很多。但就以现在的email API定义和阿里云的邮件推送服务比较来说,对于带模板发送的邮件:

  1. 他们不需要传入模板参数,他们的模板参数是固定的,是在阿里云控制台中设置的。
  2. 发送的目标也不是用邮件地址来表示,而是用阿里云控制台中收件人列表名称。
  3. 不需要主题。

@wenxuwan 所以我在开发这个阿里云邮件推送服务的组件时也做了一些改动。在带模板的邮件发送那块地方,我没有用主题和模板参数这两个字段,发送的目标也是用EmailAddress.To切片的第一个元素作为收件人列表名称。

wenxuwan commented 1 year ago

/reopen