I have an APEX 4.2 application that has an email button, based on a pl sql process, which sends out an email with a pdf file created by APEX Listener.
This worked well till reverse proxy was set up on the system. Once that happened, the url of the application was masked from http://foo.com/apex/app1 to https://bar.com/apex/app1. This has caused the email functionality to stop working. The button now throws an error:
The email is a pl sql process that goes
Select EMAIL_ID into l_mail_to from APPLICATION_USER WHERE lower(NED_ID) = lower(apex_authentication.get_login_username_cookie);
l_document := APEX_UTIL.GET_PRINT_DOCUMENT
l_id := APEX_MAIL.SEND
p_to => l_mail_to,
p_from => 'firstname.lastname@example.org',
p_subj => 'DETAILS',
p_body => 'Please review the attachment.',
p_body_html => 'Please review the attachment.'
p_mail_id => l_id,
p_attachment => l_document,
p_filename => 'DETAIL.pdf',
p_mime_type => 'application/pdf'
I'd appreciate any guidance with the same.
Now, this is my first time posting a question on the forums. If I have missed out on any information that you'd like to see, let me know and I'll post it on here.