Hello,
we wrote PL/SQL code to send Oracle Report in PDF format to outlook as the following code:
procedure U_1ButtonAction is
m_txt varchar2(2500);
emailid varchar2(50);
supp_code varchar2(20);
begin
for i in (SELECT addr_email,es_supp_code FROM ot_enquiry_supplier,om_address where es_supp_code=addr_code and
es_eh_sys_id=:p_sys_id
and rtrim(ltrim(addr_email)) is not null)
loop
emailid:=rtrim(ltrim(i.addr_email));
supp_code:=rtrim(ltrim(i.es_supp_code));
srw.run_report('report=opd004_mail destype=mail desname=' ||emailid|| ' desformat=PDF paramform=NO batch=yes SUBJECT=XX DEBUG=YES
p_sys_id=' ||:p_sys_id|| ' supp_code1=' ||supp_code|| '');
m_txt:=rtrim(ltrim(i.addr_email))||',';
end loop;
m_txt:=substr(m_txt,1,length(m_txt)-1);
EXCEPTION
when srw.run_report_failure then
srw.message(30, 'Error mailing reports.');
raise srw.program_abort;
end;
it is working with outlook 2013 without issues , but when we use Office 365 ,we got
REP-4202 and REP-4220 errors .
please any idea.
What I have tried:
procedure U_1ButtonAction is
m_txt varchar2(2500);
emailid varchar2(50);
supp_code varchar2(20);
begin
for i in (SELECT addr_email,es_supp_code FROM ot_enquiry_supplier,om_address where es_supp_code=addr_code and
es_eh_sys_id=:p_sys_id
and rtrim(ltrim(addr_email)) is not null)
loop
emailid:=rtrim(ltrim(i.addr_email));
supp_code:=rtrim(ltrim(i.es_supp_code));
srw.run_report('report=opd004_mail destype=mail desname=' ||emailid|| ' desformat=PDF paramform=NO batch=yes SUBJECT=XX DEBUG=YES
p_sys_id=' ||:p_sys_id|| ' supp_code1=' ||supp_code|| '');
m_txt:=rtrim(ltrim(i.addr_email))||',';
end loop;
m_txt:=substr(m_txt,1,length(m_txt)-1);
EXCEPTION
when srw.run_report_failure then
srw.message(30, 'Error mailing reports.');
raise srw.program_abort;
end;