Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004
    Posts
    41

    Unanswered: Sending Mail Using UTL_SMTP

    Hi All,

    We can send a mail from pl/sql using UTL_SMTP,
    can i send a attachment, i mean instead of writing data in the mail body
    i want to write it in some file and attach the file and send.

    If it is possible pls guide me how we can achieve it.

    Thanks in advance.
    'A candle will loose nothing by lighting an another candle'

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: Sending Mail Using UTL_SMTP

    It isn't simple. See this article on Ask Tom.

  3. #3
    Join Date
    Feb 2004
    Posts
    41
    Hi Andy,
    Thank U Very Much For reply.
    I have Gone Through the AskTom Doc and Tried to Send an attchment.

    Since I am not Java expert and never used Java in Oracle. So I just followed step by step to download JavaMail API. But I do not have SYS userid and password and I sent that java files to our DBA and asked him to load them for me. After he told me it was ready, I copied java source which Tom provided.

    After I copied the code and tried to compile and Run i Got Error

    Enter value for to: sowmyam@nous.soft.net
    old 36: if (to != null && to.length() > 0)
    new 36: if (to != null sowmyam@nous.soft.netlength() > 0)
    Enter value for cc: sowmyam@nous.soft.net
    old 38: if (cc != null && cc.length() > 0)
    new 38: if (cc != null sowmyam@nous.soft.netlength() > 0)
    Enter value for bcc: sowmyam@nous.soft.net
    old 40: if (bcc != null && bcc.length() > 0)
    new 40: if (bcc != null sowmyam@nous.soft.netlength() > 0)
    Enter value for subject: sowmyam@nous.soft.net
    old 42: if ( subject != null && subject.length() > 0 )
    new 42: if ( subject != null sowmyam@nous.soft.netlength() > 0 )
    java source named "mail"
    *
    ERROR at line 2:
    ORA-29536: badly formed source: Encountered "sowmyam" at line 33, column 26.

    Was expecting one of:

    "instanceof" ...

    ")" ...

    ">" ...

    "<" ...

    "?" ...

    "==" ...

    "<=" ...

    ">=" ...

    "!=" ...

    "||" ...

    "&&" ...

    "++" ...

    "--" ...

    "+" ...

    "-" ...

    "*" ...

    "/" ...

    "&" ...

    "|" ...

    "^" ...

    "%" ...

    "<<" ...

    ">>" ...

    ">>>" ...

    "." ...

    "[" ...

    "(" ...


    I am Not Understanding why is this error. can u please guide me to come out of this problem.

    Thanks & Regards
    'A candle will loose nothing by lighting an another candle'

Posting Permissions

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