It works well but the email i received is totaly blank

IS
l_mailhost VARCHAR2(64) := 'smtp.ca.sunlife';
l_from VARCHAR2(64) := '[email protected]';
l_subject VARCHAR2(64) := 'Test Mail';
l_to VARCHAR2(64) := '[email protected]';
l_mail_conn UTL_SMTP.connection;
mSID sys_logon.sid%type;
mUSERNAME sys_logon.username%type;
mOSUSER sys_logon.osuser%type;
mLOGON sys_logon.logon_time%type;
CURSOR logon_data IS SELECT sid,username,osuser,logon_time FROM sys_logon WHERE username='SYS' or username='SYSTEM';
BEGIN
l_mail_conn := UTL_SMTP.open_connection(l_mailhost, 25);
UTL_SMTP.helo(l_mail_conn, l_mailhost);
UTL_SMTP.mail(l_mail_conn, l_from);
UTL_SMTP.rcpt(l_mail_conn, l_to);
UTL_SMTP.open_data(l_mail_conn);
UTL_SMTP.write_data(l_mail_conn, 'Date: ' || TO_CHAR(SYSDATE, 'DD-MON-YYYY HH24:MI:SS') || Chr(13));
UTL_SMTP.write_data(l_mail_conn, 'From: ' || l_from || Chr(13));
UTL_SMTP.write_data(l_mail_conn, 'Subject: ' || l_subject || Chr(13));
UTL_SMTP.write_data(l_mail_conn, 'To: ' || l_to || Chr(13));
UTL_SMTP.write_data(l_mail_conn, '' || Chr(13));
open logon_data;
LOOP
FETCH logon_data INTO mSID,mUSERNAME,mOSUSER,mLOGON;
EXIT WHEN logon_data%NOTFOUND;
UTL_SMTP.write_data(l_mail_conn, mSID ||' '||mUSERNAME||' '|| mOSUSER||' '|| to_char(mLOGON) || Chr(13));
END LOOP;
execute immediate 'truncate table sys_logon';
UTL_SMTP.close_data(l_mail_conn);
UTL_SMTP.quit(l_mail_conn);
END;

yes it returns couple of row every time
but the email i recieved in Lotus Notes has blank (TO,From, Subject,Message)

Similar Messages

Maybe you are looking for

  • OBIEE 11.1.1.7.0 Skin and Style changes

    Dear All, I want to customize the skin and style in OBIEE 11.1.1.7.0. I already did for OBIEE 11.1.1.5.0 and having fair idea of files and location for customization. I used to copy s_blafp and sk_blafp from /opt/xyz/obiee/Oracle_BI1/bifoundation/web

  • Wanna some informations about using a audigy4 and vi

    Hi guys, I'm using a Soundblaster Audigy 4 in my pc. Right now, I've WindowsXP running. I tested Vista and have some questions now. Maybe someone understand my terrible bad english and will answer? First: I use a 5. system and have activated? he subw

  • I cannot read S/MIME encrypted Mails on iPhone and iPad

    I have a Certificate for my email address by Comodo. It is installed in Thunderbird on PC and iPhone and iPad with iOS 7.1.2. Thunderbird on PC behaves like expected, i can send and read encrypted emails. On iPad and iPhone i cannot read encrypted em

  • Saving backward from AS 3 to AS 2

    I recently created a slide show that works fine on my desktop, works great from the test server when viewed through the flash produced HTML but once the swf is uploaded via a content management system we have problems. Further investigation showed th

  • How to install OXS on a Mac book with broken CD drive.

    I have a Mac book. The cd drive is broken, how do i reinstall the OSX software.. I want to do a complete system wipe.