Bis*_*kie 2 email oracle oracle-apex
使用 APEX_MAIL.SEND 向多个收件人发送电子邮件的语法是什么?
官方页面https://docs.oracle.com/cd/E14373_01/apirefs.32/e13369/apex_mail.htm#AEAPI342说;p_to 电子邮件将发送到的有效电子邮件地址(必需)。对于多个电子邮件地址,使用逗号分隔的列表但是没有显示语法示例。
使用他们给出的示例,有人知道语法吗?
DECLARE
l_body CLOB;
BEGIN
l_body := 'Thank you for your interest in the APEX_MAIL
package.'||utl_tcp.crlf||utl_tcp.crlf;
l_body := l_body ||' Sincerely,'||utl_tcp.crlf;
l_body := l_body ||' The APEX Dev Team'||utl_tcp.crlf;
apex_mail.send(
p_to => 'some_user@somewhere.com', -- change to your email address
p_from => 'some_sender@somewhere.com', -- change to a real senders email address
p_body => l_body,
p_subj => 'APEX_MAIL Package - Plain Text message');
END;
Run Code Online (Sandbox Code Playgroud)
/
小智 5
您只需要将多个逗号分隔的邮件地址放入 p_to 参数中。
看这个例子:
DECLARE
l_body CLOB;
BEGIN
l_body := 'Thank you for your interest in the APEX_MAIL package.'||utl_tcp.crlf||utl_tcp.crlf;
l_body := l_body ||' Sincerely,'||utl_tcp.crlf;
l_body := l_body ||' The APEX Dev Team'||utl_tcp.crlf;
apex_mail.send(
p_to => 'some_user@somewhere.com,other_user@elsewhere.com', -- separate multiple recipients with comma
p_from => 'some_sender@somewhere.com', -- change to a real senders email address
p_body => l_body,
p_subj => 'APEX_MAIL Package - Plain Text message');
END;
Run Code Online (Sandbox Code Playgroud)
hth,莫里茨