我制作了通过作业发送电子邮件的程序,但结果集(程序的主体部分)看起来像这样混乱
Case id: 12345, 6789,8989898 Case name: name ;nameeeeeeeeeee Case Category: Email - post by post by post;Email - inbound/making fine and sending case;Email - Create date: today
我希望看起来像这样
Case id: 12345, 6789,8989898
Case name: name ;nameeeeeeeeeee
Case Category: Email - post by post by post; Email - inbound/making fine and sending case; Email - Create date: today
所以,我想在记录后创建新行 我的代码是这样的(我的程序的一部分)。
这取决于您使用什么 API 来发送电子邮件。可能是UTL_STMP,可能是UTL_MAIL等
在最低级别(UTL_SMTP),您确实需要自己编写 HTML。 AskTom 上有一个很好的例子
https://asktom.oracle.com/ords/asktom.search?tag=sending-html-using-utl-smtp
但是我没有在这里包含这些内容,因为更好的选择是使用 APEX 附带的 APEX_MAIL 包(可以在任何数据库上免费安装和使用),因为这样就很简单:
apex_mail.send(
p_to => '[email protected]',
p_from => '[email protected]',
p_body => 'plain text if you want it',
p_body_html => 'your html if you prefer that',
p_subj => 'Your email subject line'
);