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!

HTML and Plain Text, both, email formats via UTL_MAIL

RNMar 22 2018 — edited Mar 23 2018

Using Oracle 11g

Currently, we are using UTL_SMTP for sending emails. The code does not define any MIME Type .. so emails are delivered as plain text, by default.

I have to modify the existing code to allow html text. And yes, there's ton of information on Google on how to do it, but I have a very specific question.

Option 1. Using UTL_SMTP, I can define Content-Type as 'multipart/alternative', and then send text as well as html text (using appropriate content types), and email client will render one of them.

Option 2. Using UTL_MAIL, I can pass mime type as a parameter. But here I can define one and only one mime type.. text/plain versus text/html. So, if I use text/html and pass html text in the email body and email client is not able to render html tags, then it could be a problem, right?

Is my understanding of  UTL_MAIL correct? If so, then what is the right way? Should I use UTL_SMTP instead?

Please advice.

Thanks a lot,

RN

This post has been answered by Paulzip on Mar 22 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 20 2018
Added on Mar 22 2018
3 comments
2,026 views