How to use UTL_MAIL.SEND_ATTACH_VARCHAR2 to attach existing file on database server?
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,