如何使用雪花CALL SYSTEM$SEND_EMAIL与模板

huangapple go评论126阅读模式
英文:

How to use snowflake CALL SYSTEM$SEND_EMAIL with a template

问题

我正在使用存储过程中的CALL SYSTEM$SEND_EMAIL:

query_email := '' call system$send_email (''''|| notif || '''' ,'''' || mlist || '''' , ''''New ...'''' ||'''' are ready to upload...'''' , '''' || content || '''' );'' ;
EXECUTE IMMEDIATE query_email ;

我想知道是否有一种方法可以包含图像,甚至完全制作发送的电子邮件模板。
有人已经尝试过吗?

我在StackOverflow上搜索过,阅读了文档,但什么都没有找到。

感谢您的帮助。

英文:

I am using CALL SYSTEM$SEND_EMAIL in a stored procedure:

query_email := '' call system$send_email (''''''|| notif || '''''' ,'''''' || mlist || '''''' , ''''New ...'' ||'' are ready to upload...'''' , '''''' || content || '''''');'' ;
EXECUTE IMMEDIATE query_email ;

and would like to know if there is a way to include images or even completely templating the sent email.
Any one has tried this already?

I searched in stackoverflow, read the documentation and found nothing.

Thank you for you help

答案1

得分: 1

Send Email documentation中指出,mime类型可以是text/plain或text/html。HTML允许许多潜在的格式选项,包括可能的图像附件。

模板不是基本功能的一部分。您需要将其包装在一个自定义存储过程中。对于这个任务,Python存储过程可能是理想的选择。请注意,您不会使用Python来发送电子邮件,只用于构建和格式化。

英文:

Send Email documentation states that mime-type may be either text/plain or text/html. HTML would allow for a lot of potential formatting options including possibly image attachment.

Templating is not part of the base functionality. You would need to wrap that up in a customer stored procedure. A Python stored procedure may be ideal for this. Note that you would not use Python to send the email, only for building and formatting.

huangapple
  • 本文由 发表于 2023年6月15日 01:09:30
  • 转载请务必保留本文链接:https://go.coder-hub.com/76476020.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定