我在发送的邮件正文格式方面遇到问题:
这是 KO 版本(没有新行):
declare
crlf VARCHAR2(2) := chr(13)||chr(10);
msg_body VARCHAR2(2000);
begin
msg_body := msg_body || ('Blablah : '|| SYSTIMESTAMP ) || crlf;
msg_body := msg_body || ('Blablah : '|| SYSTIMESTAMP ) || crlf;
EXECUTE IMMEDIATE 'ALTER SESSION SET smtp_out_server = ''127.0.0.1''';
UTL_MAIL.send(sender => 'xx@xx.com', recipients => 'yy@yy.com', subject => 'Blah', MESSAGE => msg_body);
end;
这是 OK 版本(漂亮的新行):
declare
crlf VARCHAR2(2) := chr(13)||chr(10);
msg_body VARCHAR2(2000);
begin
msg_body := msg_body || ('Blablah : ') || crlf;
msg_body := msg_body || ('Blablah : ') || crlf;
EXECUTE IMMEDIATE 'ALTER SESSION SET smtp_out_server = ''127.0.0.1''';
UTL_MAIL.send(sender => 'xx@xx.com', recipients => 'yy@yy.com', subject => 'Blah', MESSAGE => msg_body);
end;
最好的祝福