Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re:How to programatically send an email using Lotus Notes fr

Re:How to programatically send an email using Lotus Notes fr

From: <dgoulet_at_vicr.com>
Date: Mon, 24 Jun 2002 05:48:25 -0800
Message-ID: <F001.004854D4.20020624054825@fatcity.com>


Faiz,

    I'll make the assumption that your using an Oracle 8i (8.1.6 or better) as the database server. In which case you can use the DBMS_SMTP package in Jserver to send the mail to any mail client you want, especially since you obviously can get Internet mail. Here is a wrapper I've written to use this capability, modify to your hearts content.

Dick Goulet



procedure vicor_mail(addressee in varchar2, subject in varchar2,

                                       message in varchar2, sender in varchar2
default null) is
  c utl_smtp.connection;
  v_crlf VARCHAR2(2):= CHR(13)||CHR(10);
  v_msg varchar2(4000);
  v_add_src varchar2(2000);
  v_addr varchar2(40);

  msg_chunck varchar2(2000);
  slen number := 1;
  dmy number := 0;
  a number := 0;
  t number := 0;
begin
  c := utl_smtp.open_connection('nbrahms.vicr.com');   utl_smtp.helo(c, 'nbrahms.vicr.com');
  if(sender is not null) then utl_smtp.mail(c, sender);   else utl_smtp.mail(c, 'Import<import_at_vicr.com>');   end if;
  if(instr(addressee,',') = 0) then utl_smtp.rcpt(c, addressee);   else
    v_add_src := addressee||',';
    while(instr(v_add_src,',',slen) > 0) loop
      v_addr := substr(v_add_src, slen, instr(substr(v_add_src, slen),',')-1);
      slen := slen+instr(substr(v_add_src, slen),',');
      utl_smtp.rcpt(c, v_addr);

    end loop;
  end if;
  v_msg := 'Subject: '||subject||v_crlf||message||v_crlf;   if(length(v_msg) > 2000) then
     utl_smtp.open_data(c);
     while(a < length(v_msg)) loop
       msg_chunck := substr(v_msg, a, 2000);
       a := a+length(msg_chunck);
       utl_smtp.write_data(c,msg_chunck);
     end loop;
     utl_smtp.close_data(c);

  else utl_smtp.data(c, v_msg);
  end if;
  utl_smtp.quit(c);
end;
____________________Reply Separator____________________
Author: "FAIZ QURESHI" <faizq_at_hotmail.com>
Date:       6/24/2002 2:23 AM

Hello All:
  I am using Oracle Forms 6i. I have a Form where I have to send an email of the data entered in the Form using Lotus Notes email. Does anyone know how this can be done ?
Please guide me. If possible please send me the code for doing this. Regards,
Faiz



MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: FAIZ QURESHI
  INET: faizq_at_hotmail.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author:
  INET: dgoulet_at_vicr.com
Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Mon Jun 24 2002 - 08:48:25 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US