Oracle Database 18c Express Edition Release 18.0.0.0.0
Production Version 18.4.0.0.0
Application Express 20.2.0.00.20
SQL Developer Version 19.2.1.247
Good Day:
I have an issue that I've been dealing with the last couple of days that popped up after an MS Office 365 DNS server migration. Very strange...
So if I try to utilize the following code for sending an email it works without a problem:
DECLARE
l_workspace_id VARCHAR2 (100);
begin
l_workspace_id :=
APEX_UTIL.find_security_group_id (p_workspace => 'TESTBOX');
APEX_UTIL.set_security_group_id (p_security_group_id => l_workspace_id);
APEX_MAIL.SEND (
p_to => 'my_email@my_company.gov',
P_FROM => 'my_sender_mailbox@my_company.gov',
p_body => 'This is a DB email PLAIN TEXT EMAIL test. Please disregard. Thank you.',
p_body_html => 'This is a DB email HTML VERSION test.<br>Please disregard.Thank you.',
P_SUBJ => 'DB EMAIL TEST');
BEGIN
apex_mail.push_queue (p_smtp_hostname => '111.11.11.111',
p_smtp_portno => '25');
END;
end;
However, if I format the PL/SQL block manually within the p_body_html element like the below:
DECLARE
l_workspace_id VARCHAR2 (100);
begin
l_workspace_id :=
APEX_UTIL.find_security_group_id (p_workspace => 'TESTBOX');
APEX_UTIL.set_security_group_id (p_security_group_id => l_workspace_id);
APEX_MAIL.SEND (
p_to => 'my_email@my_company.gov',
P_FROM => 'my_sender_mailbox@my_company.gov',
p_body => 'This is a DB email PLAIN TEXT EMAIL test. Please disregard. Thank you.',
p_body_html => 'This is a DB email HTML VERSION test.<br>
Please disregard.Thank you.',
P_SUBJ => 'DB EMAIL TEST');
BEGIN
apex_mail.push_queue (p_smtp_hostname => '111.11.11.111',
p_smtp_portno => '25');
END;
end;
I get the following error from MS Outlook 365:
"
It appears that your email program added invalid characters (bare line feed characters) into your message when you sent it. Try using a different email program to send your message. If the problem continues send this non-delivery report (NDR) message to your email admin for assistance.
"
It took me a while to figure that out, by just pressing enter within SQL Developer within the p_body_element area it would cause that error. I've never experienced this issue before, but I am reaching out to see if anyone has.
Thanks,
Aqua