
#Sending an email with an pdf attachment using smtp command pdf
The PDF attachment needs the actual contents of the PDF file attaching in to the mail content, which is usually in base64 encoded format for binary data (and PDF's are typically considered to be binary files) The boundaries are unique markers to indicate the start and end of sections within the mail content, so they just need to be something that doesn't appear in the content itself. I wrote 'G:\RAWAN\Rprtgroupleft.pdf'|| crlf || - Content of attachmentĬan u please explain to me what the contact of attachment that i have to add it here Raise_application_error(-20000, 'Unable to send mail', TRUE) WHEN utl_smtp.Transient_Error OR utl_smtp.Permanent_Error then 'pdf,file,attachement'|| crlf || - Content of attachment 'Content-Disposition: attachment '|| crlf || 'Content-Transfer_Encoding: 8bit'|| crlf || 'Content-Type: application/pdf '|| crlf || 'some message text'|| crlf || - Message body 'Content-Transfer_Encoding: 7bit'|| crlf || 'Content-Type: multipart/mixed '|| crlf || 'MIME-Version: 1.0'|| crlf || - Use MIME mail standard

'Date: ' || to_char(sysdate, 'Dy, DD Mon YYYY hh24:mi:ss') || crlf || V_Mail_Conn := utl_smtp.Open_Connection(v_Mail_Host, 25)

V_Mail_Host VARCHAR2(30) := 'mail.tt.net'

V_Subject VARCHAR2(80) := 'test subject' I am trying to send mail with pdf file attachment i recieved the mail with the attachment but when am trying to open the file it is returnĬan't open the PDF even when I tried to download the file i can't open it 1.7K Training / Learning / Certification.165.3K Java EE (Java Enterprise Edition).7.9K Oracle Database Express Edition (XE).3.8K Java and JavaScript in the Database.
