email - Oracle UTL_STMP - no content -
i send emails on oracle database via utl_smtp. daily emails sent automatically.
but on days there no content in email , blank mail sent.
this code:
c := utl_smtp.open_connection(smailserver); utl_smtp.helo(c, smailserver); utl_smtp.mail(c, sfrom); utl_smtp.rcpt(c, srecipients); utl_smtp.open_data(c); utl_smtp.write_data(c, 'to: ' || srecipients || utl_tcp.crlf); utl_smtp.write_data(c, 'from: ' || sfrom || utl_tcp.crlf); utl_smtp.write_data(c, 'subject: ' || replace(sdescr, '[date]',to_char(sdate,'dd.mm.yyyy')) || utl_tcp.crlf); utl_smtp.write_data(c, 'content-type: text/html;' || utl_tcp.crlf); -- write data utl_smtp.write_data(c, sdata); utl_smtp.close_data(c); utl_smtp.quit(c);
the answer put line between header-data , body-data:
utl_smtp.write_data(c, 'content-type: text/html;' || utl_tcp.crlf); -- line between header , body utl_smtp.write_data(c, utl_tcp.crlf); -- write data utl_smtp.write_data(c, sdata);
Comments
Post a Comment