Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2006
    Posts
    4

    Unanswered: How to send a email/attach with UTL_SMTP ?

    Hello to all.
    I'm new in ORACLE (First thing that i do )
    I need to send a email with UTL_SMPT with a attach file (txt/pdf...).
    I found on web a few examples.
    I already send a simple email. But when i try to attach some file ... ERROR.
    In this moment the error is "FILE doesn't exists".
    The example that i use is
    http://www.oracle.com/technology/sam...ildemo_sql.txt

    Anyone can help me?

    Thanks in advance.

    [EDIT:] The version that i use is Oracle 10g
    Last edited by Mpals; 09-22-06 at 09:02.

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

  3. #3
    Join Date
    Sep 2006
    Posts
    4
    Funny... all say the same. I already look to that.
    Maybe the reason that i don't understand is that i never see pl/sql in my front. And this guys (co-workers), are starting to killing me ...
    But, thanks for your replay , lets get reading (again) that stuff..

    [EDIT:]
    In http://asktom.oracle.com/pls/ask/f?p...A:255615160805
    it says " local pc - don't mention it, doesn't count, cannot access it. " , this is still true??
    I need to attach a file from my local PC!! So i can't use UTL_SMTP for that?
    Last edited by Mpals; 09-22-06 at 11:29.

  4. #4
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Well, Tom Kyte says
    Quote Originally Posted by Tom Kyte
    If you want to

    a) send email from the server
    b) with a file from the client

    you'll have to upload the file to the server (mod_plsql will be great for that).
    Then, it'll be in a blob and the code will work "as is". After you email the
    document, delete the blob.
    Could this do any good?

  5. #5
    Join Date
    May 2004
    Location
    Dominican Republic
    Posts
    721
    Another option would be: If you are sending mail locally (which I expect -- I dont really think you're relaying email outside your corporation for security reasons), just put the files on a network share and give permissions to that share to the users you're sending the email and then just let them know where this network path is on the email. (I have done this at a site I happen to assist).

  6. #6
    Join Date
    Sep 2006
    Posts
    4
    Quote Originally Posted by Littlefoot
    Well, Tom Kyte saysCould this do any good?
    Yes, i use blob.
    What i do...
    Convert a file in blob
    Connect to DB.
    upload blob to a temporary table
    Use utl_smtp to attach file(blob) (This info i get from "asktom")
    Send email
    close DB connection (temporary table deleted so blob).
    Thanks, for your help.
    Now, i understand (better) utl_smtp

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •