我想使用Ask Tom的以下example,但它没有按预期工作。当我用
打电话时declare
begin
xxpay_smtp.html_email
(
p_to => 'to@email.com', -- in varchar2,
p_from => 'from@email.com', -- in varchar2,
p_subject => 'Subject FD', -- in varchar2,
p_text => 'Body FD', -- in varchar2 default null,
p_html => '<html>
<head>
<title>some subject</title>
</head>
<body>
Your <b>Html</b> email message here.
</body>
</html>', -- in varchar2 default null,
p_smtp_hostname => 'smtp.com', -- in varchar2,
p_smtp_portnum => '25' -- in varchar2
);
end;
它带有一个如下所示的电子邮件正文:
Body FD
--a1b2c3d4e3f2g1
content-type: text/html;
<html>
<head>
<title>some subject</title>
</head>
<body>
Your <b>Html</b> email message here.
</body>
</html>
--a1b2c3d4e3f2g1--
我正在使用Outlook 2010.有谁知道Ask Tom示例出错的地方,或者我做错了什么?
由于
答案 0 :(得分:1)
标题后面需要一个额外的空白行,即在“Content-Type”行之后。
l_temp := l_temp || 'Content-Type: multipart/alternative; boundary=' ||
chr(34) || l_boundary || chr(34) || chr(13) ||
chr(10);
需要改为:
l_temp := l_temp || 'Content-Type: multipart/alternative; boundary=' ||
chr(34) || l_boundary || chr(34) || chr(13) ||
chr(10) || chr(13) || chr(10);