PL/SQL (MOSC)

MOSC Banner

How to use UTL_MAIL.SEND_ATTACH_VARCHAR2 to attach existing file on database server?

edited Jun 15, 2019 5:00AM in PL/SQL (MOSC) 12 commentsAnswered

Hi,

I read the document about UTL_MAIL and it looks like the parameter ATTACHMENT is used to hold contents of attachment, the parameter ATT_FILENAME can be any name to be used for the attachment on the email. It is not the file name on disk.

I also find out if I want to attach an existing file on disk, I have to use UTL_FILE to open it then read them line by line into variable that will be used on parameter ATTACHMENT on UTL_MAIL.SEND_ATTACH_VARCHAR2.

And the parameter ATTACHMENT is VARCHAR2 and it's max size is 4000 bytes. The existing file (plain text file) is bigger than 50KB,

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center