Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Make body Bold and Italic while sending an email

user11334489Sep 22 2016 — edited Sep 22 2016

Hi All,

How to make body Bold and Italic while sending an email. Below is my code

I'm using Oracle 10g Database.

DECLARE

  l_blob LOBS_TABLE.pdf_blob%TYPE;

BEGIN

  SELECT pdf_blob

  INTO   l_blob

  from LOBS_TABLE

  where blob_id=get_blob_id;

  send_mail(p_to       
=> get_to_address,

            p_from 
     => get_from_address,

            p_subject 
  => 'Employee Information',

            p_text_msg 
=> 'Employee Data for 2016.',   --Body Should Be in Bold and
Italic

            p_attach_name
=> 'Employee Details.pdf',

            p_attach_mime
=> 'application/pdf',

            p_attach_blob
=> l_blob,

            p_smtp_host 
=> get_smtp_host);

End;

p_text_msg in send_mail Procedure:-

  IF p_text_msg IS NOT NULL THEN

    UTL_SMTP.write_data(l_mail_conn, '--' ||
l_boundary || UTL_TCP.crlf);

    UTL_SMTP.write_data(l_mail_conn,
'Content-Type: text/plain; charset="iso-8859-1"' || UTL_TCP.crlf ||
UTL_TCP.crlf);

    UTL_SMTP.write_data(l_mail_conn, p_text_msg);

    UTL_SMTP.write_data(l_mail_conn, UTL_TCP.crlf
|| UTL_TCP.crlf);

  END IF;

Thanks and Regards,

Abu

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 20 2016
Added on Sep 22 2016
5 comments
2,785 views