Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

send mail with attachment in apex

C_JMay 15 2016 — edited May 16 2016

hai,

I am trying to send mail with attachment but it is showing error as follows

PLS-00306: wrong number or types of arguments in call to 'ADD_ATTACHMENT' ORA-06550: PL/SQL: Statement ignored

This is the code I wrote

declare 

 

  l_id number; 

 

begin 

 

  l_id := apex_mail.send (  

              p_to    => :P2_TO,  

              p_from  => :P2_FROM,

              p_subj => :P2_SUBJECT,

              p_body      => :P2_BODY);

                    

  APEX_MAIL.ADD_ATTACHMENT (p_mail_id    => l_id, 

                              p_attachment => :P2_ATTACHMENT,

                              p_filename => :P2_FILENAME,

                              p_mime_type => :P2_MIME_TYPE

                              ); 

end;

Please kindly do help me in writing the code. Thanks in advance.

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 13 2016
Added on May 15 2016
18 comments
4,436 views