How can I send a .pdf attachement using maildemo_sql.txt

Hi
I have created a PL/SQL package using the following link.
Could you plese tell me how can I send a .pdf as an attachement using the follwing package?
http://www.oracle.com/technology/sample_code/tech/pl_sql/htdocs/maildemo_sql.txt
regards

When using the "MailDemo" package, in order to send email attachements, the document you attach MUST reside on the Database Server or UTL_SMTP or UTL_MAIL Oracle packages won't be able to find the file. I recommend you define a location (directory) on the database server file system where all email attachements must be stored and reference this location using an Oracle Directory object. You will need to modify the BEGIN_ATTACHMENT procedure to add the file location referenced by the Oracle Directory object to the filename parameter. For example:
/* Create the Oracle DIRECTORY */
CREATE OR REPLACE DIRECTORY FILE_ATTACHMENTS as '/temp/attachments/';
/* Modification to MAILDEMO */
  PROCEDURE begin_attachment(conn         IN OUT NOCOPY utl_smtp.connection,
                    mime_type    IN VARCHAR2 DEFAULT 'text/plain',
                    inline       IN BOOLEAN  DEFAULT TRUE,
                    filename     IN VARCHAR2 DEFAULT NULL,
                    transfer_enc IN VARCHAR2 DEFAULT NULL) IS
  BEGIN
    write_boundary(conn);
    write_mime_header(conn, 'Content-Type', mime_type);
    IF (filename IS NOT NULL) THEN
       IF (inline) THEN
       write_mime_header(conn, 'Content-Disposition',
         /* 'inline; filename="'||BFILENAME('filename||'"'); */ /* Line BEFORE */
           'inline; filename="'||BFILENAME('FILE_ATTACHMENTS',filename)||'"'); /* Line AFTER */
       ELSE
       write_mime_header(conn, 'Content-Disposition',
         /* 'attachment; filename="'||filename||'"'); */  /* Line BEFORE */
           'attachment; filename="'||BFILENAME('FILE_ATTACHMENTS',filename)||'"');  /* Line AFTER */
       END IF;
    END IF;
    IF (transfer_enc IS NOT NULL) THEN
      write_mime_header(conn, 'Content-Transfer-Encoding', transfer_enc);
    END IF;
    utl_smtp.write_data(conn, utl_tcp.CRLF);
  END;If you have to send the file attachment from the User's workstation, then I suggest you either add the ability to FTP a file from a users workstation to the Database Server; use a javabean to send email directly from the client workstation or use WebUtil to open an Outlook message and attach the file using Outlook. I personally prefer using the database package to send email because you have a central point that all processes use and that makes the process easier to maintain. If you opt to try the Java Bean or WebUtil options, here are some great links that work really well also.
Java Option:
Send email with html body and local file attachments
WebUtil Option:
Sending Email via Outlook via forms
Re: Sending email from Oracle Forms with attachments
I cannot confirm the WebUtil options work as I have not tested these myself, however, I have tested the Java option and it works fine.
Hope this helps,
Craig B-)
If a response is helpful or correct, please mark it accordingly.

Similar Messages

  • How can i send a PDF file to my i phone and be able to read it

    How can i send a PDF file to my i phone and be able to read it

    Use the free Adobe Reader for iPhone -> https://itunes.apple.com/us/app/adobe-reader/id469337564?mt=8.
    Clinton

  • How can I edit a PDF file using Adobe assistant?

    How can I edit a PDF using Adobe assistant?

    The is no PDF editor called Adobe Assistant. What did you actually buy (check your invoice for the name if you can't otherwise tell)?

  • How can i send emailed PDF's directly to my iPad iBooks rather than have them sitting in my inbox unorganized...

    I had hoped that my PDF's in my iPhone iBooks would automatically also go to my iPad iBooks without the need for syncing. Is there some setting to make that happen?
    If that is not an option, how can I send my emailed PDF's directly to my iPad iBooks; I no longer want them sitting in my email folder since there is no way to organize the content of the email folders and I am looking for a way to organize this information that I need to be able to quickly retrieve.

    Thank you for your rapid reply! Yes, I was able to move them from my email to iBooks on my iPhone in this way, but the same method did not work for the iPad . I was really hoping for some super simple solution... thanks for your comment though

  • HT2500 How can I ensure a PDF attachment opens/displays when a recipient receives an email so they don't have to download/open it manually when I send it using Mail?

    I need to send a PDF document and have it display within the body of the email instead of as a download icon. I'm using Mail and it previews before I send it, but the end user gets a blank email with an attachment icon.
    Any ideas?

    You cannot ensure that. It depends on the email program your recipient is using. If his program displays icons rather than previews for PDFs, than that is what he will see. Aside from convincing him to use Apple Mail, you cannot control how his application works.

  • How can I send a PDF via mail without it becoming an attached file?

    Hi All!
    I need to know how I am able to send a PDF file via mail, without it becoming an attached file. This means when the receiver opens the mail, he automatically sees the PDF without first having to read the normal mail text and scroll down to open the attached PDF file. Just like a spam newsletter
    Also I want to know - I want some illustrations in my portfolio to be a hyperlink to a website, is this possible on a picture (not on an URL) - and if so - How?
    Hope you can help me out here!
    ** I use Adobe Acrobat Reader Pro X 10.1.10 on a Macbook Pro 10.8.5**
    Thanks,
    Carlinsky

    Carlinsky wrote:
    Hi All!
    I need to know how I am able to send a PDF file via mail, without it becoming an attached file. This means when the receiver opens the mail, he automatically sees the PDF without first having to read the normal mail text and scroll down to open the attached PDF file. Just like a spam newsletter
    Not possible with Adobe Reader or Adobe Acrobat.

  • HT6030 how can i send word/pdf/ppt/excel sheets as attachments to my emails via gmail using ipad

    i have been trying to save word pdf excel and ppts on my ipad and also send these files as attachements using gmail App but I am unable. please advise.

    Open the file you want to attack in an iPad program that will open it (Docs 2 Go for example). The program should have a share icon somewhere. Click on that and then select email. Without a little trickery I don't know how to attach more than one item per email.

  • How can I send a PDF via PHP?

    I'm trying to get a PDF form that has a name an email address field and submit to send the page, or all pages to the email address but can't get it to email without using Outlook etc. Is PHP the way?

    Carlinsky wrote:
    Hi All!
    I need to know how I am able to send a PDF file via mail, without it becoming an attached file. This means when the receiver opens the mail, he automatically sees the PDF without first having to read the normal mail text and scroll down to open the attached PDF file. Just like a spam newsletter
    Not possible with Adobe Reader or Adobe Acrobat.

  • How can I open a pdf attachment in Mozilla Thunderbird?

    In my Thunderbird email account, I checked a box for MSWord to open all attachments, but I would like to reverse that decision since I got a pdf attachment, and MSWord doesn't open that. How do I change it back to the way it was so the pdf attachment can be opened with adobe?

    Tools > Options > Attachments > Incoming tab
    * in the 'Content Type' column:
    * look for: Microsoft Office Word document
    * then look at the 'Action' for it
    * click on the current Action and select 'use Microsoft Office Word'
    If this is already setup ok then leave alone and do the next step.
    Is there a 'Content type' for Adobe Acrobat Document' ?
    If yes,
    * click on the Action and select 'Use Adobe Acrobat' or 'Adobe Reader'
    * click on OK
    If there is no 'Content type' for Adobe Acrobat Document'
    then click on OK and do the next step below.
    * Locate email with pdf attachment
    * right click on attachment and choose Open
    * select 'Open with' and choose 'Adobe Reader'
    * select 'do this automatically for files like this from now on.'
    * click on OK

  • How can I send a PDF form for someone to complete, then lock it for no one to see except us when they send it back?

    We would like to create a PDF form to collect sensitive information (phone numbers, payment information) from our customers. Ideally, we would like for them to be able to fill it out, then hit a button to encrypt it when completed, and send it back to us for us to view. Kind of like sending out an open, self-locking box for them to fill, and once they close it no one can see the contents without the key (which we would have).
    I’m using Adobe Acrobat Pro XI (11.0.07) on Mac OSX (10.9.4).
    Is this possible? If so, how do I do this? Thank you in advance!

    You can use certificate encryption. Each of your customers needs to have a digital certificate with a private key and send you the public key version of his/her certificate. You also need to have a digital certificate with private key and to send each customer the public version of your certificate.  Then after each customer fills in your form, she encrypts it with certificate encryption entering as recipients herself and you before sending this PDF to you. This way only this particular customer and you can open and see PDF filled with sensitive information.
    This workflow presumes that you and each of your customers can procure a digital certificate (Digital ID in Acrobat-speak).

  • How can recipients submit completed PDF forms using a MAC?

    We have created fillable PDF forms using LiveCycle Designer 8.0.  They include
    submit buttons that are set to submit the completed forms as PDFs.  Rights have been extended for Adobe Reader users.  They work great when the recipient is using a PC, but when they are using a MAC we have a number of problems:
    1) the Print and Submit buttons do not work
    2) when the recipient saves and e-mails the file manually, the data they entered is only visible when you click on that field
    Help!  How can our MAC recipients submit their completed form as a PDF that displays all of the data!
    Thanks!

    Thanks Niall.  This information proved really helpful in confirming the problem.  We ran some tests and the problem does seem to only occur when MAC recipients are using Preview.
    We recieved this link from Adobe, which provides a solution if you have access to all the recipients:
    http://blogs.adobe.com/pdfdevjunkie/script_to_fix_mac_osx_previewa.html
    Thanks to Niall and Paul for all your help!

  • How can I open a PDF attachment?

    I work for FEMA and receive a daily briefing.  The email comes with a PDF attachment.  As of Monday, when I clicked on the link the PDF would not open.  I updated my Adobe Reader, thinking that would resolve the issue but it still will not open.

    If you save the attachment to your desktop, can you open it using File>Open in Reader?
    If not, what exactly happens? What version of Reader are you using?

  • How can I send a PDF file via my yahoo or google email programs?

    I just downloaded some photos from a friend's camera, & I want to send copies via email. I created a PDF file, but can't figure out how to email the file out (it only offers to send via Windows Mail-which I don't have). Do I need to create a different kind of file for the pix, or do I just need to send one at a time?
    == This happened ==
    Not sure how often
    == I tried to attach the PDF file to an email to send via yahoo

    Use the free Adobe Reader for iPhone -> https://itunes.apple.com/us/app/adobe-reader/id469337564?mt=8.
    Clinton

  • I am unable to send a PDF attachment using mac mail so that it appears in the body of the email when arrives in the recipient's inbox.

    I attach the pdf file as a view in place instead of view as icon, but it arrives in the recipient's inbox as a pdf icon attachment.  I have heard that there are programs that can make the attachment be viewed in the body of the email, but i have been unable to find them.  Does anyone have any suggestions??  I have called apple care, and been to the genius bar, but nothing.  it seems that if the email is sent from mac mail to mac mail it works, but to any other mail program they only receive the icons.

    new account are created without a password, so asking for it is normal.
    see http://thunderbirdtweaks.blogspot.com.au/2011/07/pssswords.html
    Compare the passwords Thunderbird has for the other accounts and see if using the same one is what you need to do.

  • How do I open a PDF attachment using the Open In function from iPad mail

    I Am trying to open a PDF document from my mail. In previous versions of the iOS (presently I am on 7.1.1) the open in feature of the email  re organised that you had an rhe adobe reader installed and allowed you to select this to open the document. Thiis no longer working for me.

    The functionality certainly has not gone away with iOS 7. What do you see when you attempt this (and how do you go about it)?
    Only thing I can recommend off hand is to try a reset: Simultaneously hold down the Home and On buttons until the device shuts down. Ignore the off slider if it appears. Once shut down is complete, if it doesn't restart on it own, turn the device back on using the On button. In some cases it also helps to double click the Home button and close all apps BEFORE doing the reset.

Maybe you are looking for