Oracle Forms (MOSC)

MOSC Banner

java.lang.NullPointerException when sending email

edited Jan 13, 2011 10:48PM in Oracle Forms (MOSC) 3 commentsAnswered
 hi to all,
i did what explains in note:184339.1 to send email, creating a form and putting the code:

Declare
    ErrorStatus     number;
    arr             ORA_JAVA.JARRAY;
    raisedException ora_java.jobject;
  excp            ORA_JAVA.JEXCEPTION;
begin
   
    ErrorStatus := SendMail.Send( 'smtp.gmail.com'         ,
                                  'nagpalma@gmail.com'     ,
                                  :INTERFACE_MAIL.sendto   ,
                                  ''   ,
                                  ''   ,
                                  :INTERFACE_MAIL.subject  ,
                                  :INTERFACE_MAIL.message  ,
                                   arr                       , --Error Message
                                  :INTERFACE_MAIL.attachment);
                             
    -- Notice that, For multiple attachements, files are separated by "///"
   
    -- The ErrorStatus returns 0 if the main was sent successfully
  If ErrorStatus = 0 then
      Message ('success');
  else
    Message(ErrorStatus);
  End if;
Exception
    -- Handler para ORA-105100
    when ORA_JAVA.JAVA_ERROR then

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center