DECLARE
c UTL_SMTP.connection;
v_subject VARCHAR2 (180) := 'Monthly Interest Owners Reports';
v_msg VARCHAR2 (32000)
:= ' Please click on the following link to access the most recent Monthly Interest Owners Reports:
\\ckcndsk1\OneCalP_WebMethod_Top\WebMethods\pos\data\outbound\Evergreen
Please note the following differences and limitations of the reports:
1. The information contained in the reports is only current through the day before the reports are pulled. Any changes in owner information or status or any changes to decks or new decks created after the day before the reports are pulled will not be displayed until the new reports are pulled.
2. Area Report;
a. Each Cost Center listed on this report, regardless of which county it falls under, will contain a complete list of the owners on the deck.
b. Some Fields and Cost Centers may appear under multiple counties or the incorrect county. For the best results, search by Cost Center.
3. Pre-Checkwrite Value Reports;
a. All owners, including suspended owners, are included on this report.
b. Working interest owners; expenses have not been deducted from the listed revenue.
c. The amount of funds listed in suspended owners; accounts includes any funds which were placed into the owners; accounts in previous months for those consecutive months the owners are held in suspense. This can result in the same funds being counted multiple times.
d. Funds transferred from one owner;s account to another are counted on both owners; accounts.
4. Post Checkwrite Value Reports;
a. Working interest owners; expenses have been deducted from the revenue for working interest owners with a ;N; Net Bill Indicator.
b. Displays actual payments made by only pulling payments that owners have cleared.
i. The most recent month;s payment is not included in this report, because Accounting updates ACH/check status the month after the payments are made to the owners.
c. Funds transferred from one owner;s account to another are only counted once, on the second owner;s account.
d. Owners in suspense are not included on this report. In order for an owner to be included on this report, they have to have cleared the payment they received from CRC.
e. Working interest owners; expenses have not been deducted from the listed revenue for those working interest owners with a ;Y; Net Bill Indicator.';
PROCEDURE send_header (name IN VARCHAR2, header IN VARCHAR2)
AS
BEGIN
UTL_SMTP.write_data (c, name || ': ' || header || UTL_TCP.CRLF);
END;
BEGIN
c := UTL_SMTP.open_connection ('mail.crc.com');
UTL_SMTP.helo (c, 'foo.com');
UTL_SMTP.mail (c,
'sender@foo.com');
UTL_SMTP.rcpt (c,
'sudhamsu.josyam@crc.com');
UTL_SMTP.open_data (c);
send_header ('From', '"System" <
noreply@crc.com>');
send_header ('To', '"Recipient" <
sudhamsu.josyam@crc.com>');
send_header ('Subject', v_subject);
UTL_SMTP.write_data (c, UTL_TCP.CRLF || v_msg);
UTL_SMTP.close_data (c);
UTL_SMTP.quit (c);
EXCEPTION
WHEN UTL_SMTP.transient_error OR UTL_SMTP.permanent_error
THEN
BEGIN
UTL_SMTP.quit (c);
EXCEPTION
WHEN UTL_SMTP.transient_error OR UTL_SMTP.permanent_error
THEN
NULL;
END;
raise_application_error (
-20000,
'Failed to send mail due to the following error: ' || SQLERRM);
END;