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!

UTL_SMTP package to send email in html or plain text

133200Sep 6 2002
Here's the main body of my procedure which sends an email. It sends an HTML-formatted just fine, but when it sends a plain text message the whole text is strung together in the recipient's email without any carriage returns (I'm storing the emails in a clob type within my table).

Can anyone see what's wrong? Is it the v_mime_type variable ?
Thanks,
Bob Mazzo

-----------------------------------
BEGIN
mail_conn := utl_smtp.open_connection(mailhost, 25);

utl_smtp.helo(mail_conn, mailhost);
utl_smtp.mail(mail_conn, psender);
utl_smtp.rcpt(mail_conn, precipient);


v_mime_type := 'Content-Type: text/html ' || v_crlf ;
v_msg := 'From: ' || psender || '' || v_crlf ||
'Reply-To:' || preplyto || v_crlf ||
v_mime_type || 'Subject: ' || psubject || v_crlf || pmessage || v_crlf;

utl_smtp.data(mail_conn, v_msg);

utl_smtp.quit(mail_conn);

Exception
....
END;
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 18 2002
Added on Sep 6 2002
3 comments
478 views