我正在使用该功能SEND_ATTACH_RAW
发送带有附件的邮件:
UTL_MAIL.SEND_ATTACH_RAW(
sender=>v_sender,
recipients=>v_recipients,
cc=>NULL,
bcc=>NULL,
subject=>'foto',
message=> 'foto de prueba',
mime_type=> 'text/plain; charset=us-ascii',
priority=>3,
attachment=>import_binary_file('/tmp/IMG_20220127_173051147.jpg'),--this function load binary as bytea
att_inline=>TRUE,
att_mime_type=>'image/jpg',
att_filename=>'test.jpg');
并且工作得很好,但是我收到的附件文件名为“noname”,请你帮忙解决这个问题,我想收到这个att_filename
值
版本:
PostgreSQL 14.2 (EnterpriseDB Advanced Server 14.2.1) on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36), 64-bit
为了所有人的利益,我已将其发布为解决方案。尝试使用
att_inline => FALSE
我根据下面的 oracle MOS 文档提出了这个解决方案,该解决方案也适用于 EDB Postgres。
如何使用 UTL_MAIL 发送任何类型的附件(文档 ID 946811.1)
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句