[Home] [Help]
130: if (p_type = 'I') then
131: begin -- inbound message
132: begin
133: select a.db_link into l_dblink
134: from iem_db_connections a, iem_email_accounts b
135: where a.db_server_id=b.db_Server_id
136: and b.email_account_id = mdts.email_account_id and a.is_admin='A';
137: exception
138: when others then
135: where a.db_server_id=b.db_Server_id
136: and b.email_account_id = mdts.email_account_id and a.is_admin='A';
137: exception
138: when others then
139: l_err_msg := substr(l_err_msg ||'Error in query iem_db_connection and iem_email_accounts'||SQLERRM, 1000);
140: end;
141:
142: begin
143: execute immediate 'select reply_to_str, cc_str, bcc_str from '
144: ||'OM_HEADER@'||l_dblink||' where msg_id = mdts.source_message_id'
145: into l_reply_to_str, l_cc_str, l_bcc_str;
146: exception
147: when others then
148: l_err_msg := substr(l_err_msg || 'Error in query iem_db_connection and iem_email_accounts'||SQLERRM, 1000);
149: end;
150:
151: if (l_err_msg is null) then
152: l_mig_status := 'R';
241: end;
242:
243: begin
244: select a.db_link into l_dblink
245: from iem_db_connections a, iem_email_accounts b
246: where a.db_server_id=b.db_Server_id
247: and b.email_account_id = mdts.email_account_id and a.is_admin='A';
248: exception
249: when others then
246: where a.db_server_id=b.db_Server_id
247: and b.email_account_id = mdts.email_account_id and a.is_admin='A';
248: exception
249: when others then
250: l_err_msg := substr(l_err_msg ||'Error in query iem_db_connection and iem_email_accounts'||SQLERRM, 1000);
251: end;
252:
253: begin
254: execute immediate 'select reply_to_str, cc_str, bcc_str from '
255: ||'OM_HEADER@'||l_dblink||' where msg_id = mdts.source_message_id'
256: into l_reply_to_str, l_cc_str, l_bcc_str;
257: exception
258: when others then
259: l_err_msg := substr(l_err_msg || 'Error in query iem_db_connection and iem_email_accounts'||SQLERRM, 1000);
260: end;
261:
262: if (l_err_msg is null) then
263: l_mig_status := 'R';