Send email using Oracle Forms 6i through Outlook Express

I am working on oracle Forms 6i and Oracle 9i (9.2.0.1) database. My requirement is How to trigger email sending single client at a time while using Oracle Forms 6i through Outlook Express?
To do this I have written the following code.
PROCEDURE send_mail IS
OutlookApp OLE2.OBJ_TYPE;
NameSpace OLE2.OBJ_TYPE;
MailItem OLE2.OBJ_TYPE;
OLEPARAM OLE2.LIST_TYPE;
Send OLE2.OBJ_TYPE;
Attachments OLE2.OBJ_TYPE;
Attachment_dummy OLE2.OBJ_TYPE;
var1 varchar2(1000);
Begin
var1 := :mapiole.message;
OutlookApp := OLE2.CREATE_OBJ('Outlook.Application');
OLEPARAM := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(OLEPARAM,'MAPI');
NameSpace := OLE2.INVOKE_OBJ(OutlookApp,'GetNameSpace',OLEPARAM) ;
OLE2.DESTROY_ARGLIST(OLEPARAM);
OLEPARAM := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(OLEPARAM,0);
MailItem := OLE2.INVOKE_OBJ(OutlookApp,'CreateItem',OLEPARAM);
OLE2.DESTROY_ARGLIST(OLEPARAM);
OLE2.SET_PROPERTY(MailItem,'To',:to);
OLE2.SET_PROPERTY(MailItem,'Subject',:subject);
OLE2.SET_PROPERTY(MailItem,'Body', var1);
--add an attachment
if :mapiole.attach is not null then
Attachments := OLE2.GET_OBJ_PROPERTY(MailItem,'Attachments');
OLEPARAM := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(OLEPARAM,:attach);
Attachment_dummy := OLE2.INVOKE_OBJ(Attachments,'add',OLEPARAM);
OLE2.DESTROY_ARGLIST(OLEPARAM);
end if;
Send := OLE2.INVOKE_OBJ(MailItem,'Send');
--destroy objects
OLE2.RELEASE_OBJ(MailItem);
OLE2.RELEASE_OBJ(NameSpace);
OLE2.RELEASE_OBJ(OutlookApp);
END;
Create a block called MAPIOLE with the following canvas layout:
To:      ============================
Subject: ============================
Message: ============================
============================
Attachment: ============================           SEND      
When I press the SEND button then
Error comes "FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception
ORA-305500
How can I do this?
When I use Microsoft Outlook 2003 It works fine.
Please help me.
Thanks.

Error comes "FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception
ORA-305500
hi
plz if there is any attach library recompile it or open the pll and compile it with ctrl+shift+k and ctrl+t.
sarah

Similar Messages

  • Send email using Oracle Forms 6i through MS Outlook 2003

    I am working on oracle Forms 6i and Oracle 9i (9.2.0.1) database. My requirement is How to trigger email sending to clients while using Oracle Forms 6i through Microsoft Outlook 2003?
    To do this I have written the following code.
    PROCEDURE send_mail IS
    OutlookApp OLE2.OBJ_TYPE;
    NameSpace OLE2.OBJ_TYPE;
    MailItem OLE2.OBJ_TYPE;
    OLEPARAM OLE2.LIST_TYPE;
    Send OLE2.OBJ_TYPE;
    Attachments OLE2.OBJ_TYPE;
    Attachment_dummy OLE2.OBJ_TYPE;
    var1 varchar2(1000);
    Begin
    var1 := :mapiole.message;
    OutlookApp := OLE2.CREATE_OBJ('Outlook.Application');
    OLEPARAM := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(OLEPARAM,'MAPI');
    NameSpace := OLE2.INVOKE_OBJ(OutlookApp,'GetNameSpace',OLEPARAM) ;
    OLE2.DESTROY_ARGLIST(OLEPARAM);
    OLEPARAM := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(OLEPARAM,0);
    MailItem := OLE2.INVOKE_OBJ(OutlookApp,'CreateItem',OLEPARAM);
    OLE2.DESTROY_ARGLIST(OLEPARAM);
    OLE2.SET_PROPERTY(MailItem,'To',:to);
    OLE2.SET_PROPERTY(MailItem,'Subject',:subject);
    OLE2.SET_PROPERTY(MailItem,'Body', var1);
    --add an attachment
    if :mapiole.attach is not null then
              Attachments := OLE2.GET_OBJ_PROPERTY(MailItem,'Attachments');
              OLEPARAM := OLE2.CREATE_ARGLIST;
              OLE2.ADD_ARG(OLEPARAM,:attach);
              Attachment_dummy := OLE2.INVOKE_OBJ(Attachments,'add',OLEPARAM);
              OLE2.DESTROY_ARGLIST(OLEPARAM);
    end if;
    Send := OLE2.INVOKE_OBJ(MailItem,'Send');
    --destroy objects
    OLE2.RELEASE_OBJ(MailItem);
    OLE2.RELEASE_OBJ(NameSpace);
    OLE2.RELEASE_OBJ(OutlookApp);
    END;
    Create a block called MAPIOLE with the following canvas layout:
    || To: |============================|
    |
    | Subject: |============================|
    |
    | Message: |============================ |
    |============================|
    | Attachment: |============================| |SEND | |
    When I press the SEND button then
    Microsoft Office Outlook window open containing the message below.
    A program is trying to automatically send e-mail on your behalf.
    Do you want to allow this?
    If this is unexpected,it may be a virus and you should choose "No".
    Yes No Help Button are there.
    If choose No then
    Error comes "FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception
    ORA-305500
    else Message send successfully.
    I want not to open Outlook Message window and message automatically send to given email id.
    How can I do this?
    Please help me.
    Thanks.

    Try disable warnings:
    Visual Basic 6 (VBA)
    OlSecurityManager.ConnectTo OutlookApp
    OlSecurityManager.DisableOOMWarnings = True
    On Error Goto Finally
    '... any action with protected objects ...
    Finally:
    OlSecurityManager.DisableOOMWarnings = False
    If you find correct syntax with OLE2 post your code ;)

  • Send email to muliple clients using Oracle Forms 6i through MS Outlook 2003

    I am working on oracle Forms 6i and Oracle 9i (9.2.0.1) database. My requirement is How to trigger email sending to multiple clients at a time while using Oracle Forms 6i through Microsoft Outlook 2003?
    To do this I have written the following code.
    PROCEDURE send_mail IS
    OutlookApp OLE2.OBJ_TYPE;
    NameSpace OLE2.OBJ_TYPE;
    MailItem OLE2.OBJ_TYPE;
    OLEPARAM OLE2.LIST_TYPE;
    Send OLE2.OBJ_TYPE;
    Attachments OLE2.OBJ_TYPE;
    Attachment_dummy OLE2.OBJ_TYPE;
    var1 varchar2(1000);
    Begin
    var1 := :mapiole.message;
    OutlookApp := OLE2.CREATE_OBJ('Outlook.Application');
    OLEPARAM := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(OLEPARAM,'MAPI');
    NameSpace := OLE2.INVOKE_OBJ(OutlookApp,'GetNameSpace',OLEPARAM) ;
    OLE2.DESTROY_ARGLIST(OLEPARAM);
    OLEPARAM := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(OLEPARAM,0);
    MailItem := OLE2.INVOKE_OBJ(OutlookApp,'CreateItem',OLEPARAM);
    OLE2.DESTROY_ARGLIST(OLEPARAM);
    OLE2.SET_PROPERTY(MailItem,'To',:to);
    OLE2.SET_PROPERTY(MailItem,'Subject',:subject);
    OLE2.SET_PROPERTY(MailItem,'Body', var1);
    --add an attachment
    if :mapiole.attach is not null then
    Attachments := OLE2.GET_OBJ_PROPERTY(MailItem,'Attachments');
    OLEPARAM := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(OLEPARAM,:attach);
    Attachment_dummy := OLE2.INVOKE_OBJ(Attachments,'add',OLEPARAM);
    OLE2.DESTROY_ARGLIST(OLEPARAM);
    end if;
    Send := OLE2.INVOKE_OBJ(MailItem,'Send');
    --destroy objects
    OLE2.RELEASE_OBJ(MailItem);
    OLE2.RELEASE_OBJ(NameSpace);
    OLE2.RELEASE_OBJ(OutlookApp);
    END;
    Create a block called MAPIOLE with the following canvas layout:
    To:      ============================
    Subject: ============================
    Message: ============================
    ============================
    Attachment: ============================           SEND      
    When I press the SEND button then
    Error comes "FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception
    ORA-305500
    How can I do this?
    Please help me.
    Thanks.

    Do you have a requirement to use MS-Outlook from the Client or simple send email to a list of recipients? If the requirement is simply to send email to a list of recipients, I suggest you use UTL_SMTP from the database to send your email rather than OLE to Outlook on the Users computer. Search OTN or the forums for 'MAILDEMO' and you will find many examples on how to send email from the database.
    Hope this helps.
    Craig...

  • Sending email from oracle forms

    Hi, I want to send an email within oracle forms 10g.
    If anyone could help me.
    Thanks.

    Hi,
    I didn't understand.....
    Isn't it convienient to you , to create a button , for example , and call the UTL_MAIL.SEND(......<parameters given in text items of your form>......) buolt in procedure....????? or the equivalent procedure in UTL_SMTP ....????
    Regards,
    Simon

  • How to sending email from Oracle Forms

    How to sending email from Oracle 6i(Forms)
    I need to send email to a distribution list(multiple email addresses).

    send email of multiple email address
    [email protected],[email protected],[email protected]
    create or replace function mailout
    (sender in varchar2,
    recipient in varchar2,
    ccrecipient in varchar2,
    subject in varchar2,
    message in varchar2) return number
    is
    crlf varchar2(2) := chr(13)||chr(10);
    connection utl_smtp.connection;
    mailhost varchar2(50) := 'Add email server Ip Address here';
    header varchar2(4000);
    v_num number :=1;
    str number:=0;
    email varchar2(50);
    begin
    connection := utl_smtp.open_connection(mailhost,25);
    header := 'Date: '||to_char(sysdate,'dd mon yy hh24:mi:ss')||crlf||
    'From: '||sender||' '||crlf||
    'Subject: '||subject||crlf||
    'To: '||recipient||crlf||
    'Cc: '||ccrecipient||crlf||message;
    utl_smtp.helo(connection,mailhost);
    utl_smtp.mail(connection,sender);
    utl_smtp.rcpt(connection,recipient);
    while (instr(ccrecipient,',',1,v_num)>0) loop
    email:=substr(ccrecipient,str+1,instr(ccrecipient,',',1,v_num)-str-1);
    dbms_output.put_line(email);
    utl_smtp.rcpt(connection,email);
    str:=instr(ccrecipient,',',1,v_num);
    v_num:=v_num+1;
    end loop;
    utl_smtp.open_data(connection);
    -- utl_smtp.write_data(connection,header);
    utl_smtp.write_data(connection,'MIME-Version:1.0'||crlf||'Content-type:text/html'||crlf||header);
    utl_smtp.close_data(connection);
    utl_smtp.quit(connection);
    return 0;
    exception
    when utl_smtp.invalid_operation then
    dbms_output.put_line('Invalid Operation in SMTP transaction');
    return 1;
    when utl_smtp.transient_error then
    dbms_output.put_line('Temporary problem with sending email ');
    return 2;
    when utl_smtp.permanent_error then
    dbms_output.put_line('Permanent problem with sending email ');
    return 3;
    end;

  • Sending email from Oracle Forms with attachments

    Hi,
    Is there any package or option available in Oracle forms to send email with attachments?
    Your reply will be highly appreciated.
    Regds,
    noneda

    There are a couple of ways to send email (with attachements) from Oracle Forms. Check out these links to some examples.
    using OLE2 or CLIENT_OLE2 to access a mail-client via Mail-Api ( Get and set Outlook properties )
    using MAILTO in conjunction with HOST or CLIENT_HOST to "start" a mail-client ( Re: Open Microsoft Outlook new massage with TO containing the email address )
    using UTL_SMTP for database-side-mailing ( Re: Send mail with attachment )
    Hope this helps,
    Craig...

  • Can't send email using Windows Mail (Vista) through Anonymizer proxy server

    I have recently installed a new version of Anonymizer which I need for access to a particular forum, but when it is connected I cannot send email. The message I got from Anonymizer support is as follows:
    Anonymizer Universal blocks unencrypted mail port 25 to prevent abuse of our service by spammers. If you have an email address set up to use port 25, please contact your mail administrator to use an alternate port. We have found email providers prefer certain ports including 587 and 465. These ports generally require authentication and you may need to change your outgoing mail server to require authentication.
    I tried these port numbers but they also gave errors. Any suggestions will be appreciated.
    Solved!
    Go to Solution.

    I found the thread on port 587 and I followed the advice on the link for Outlook Express.
    http://www22.verizon.com/ResidentialHelp/HighSpeed​/Email/Setup+And+Use/QuestionsOne/124306.htm
    Windows Mail is slightly different but when I set the outgoing port to 587 without requiring authentication, and it seems to be working OK now. So I'll mark this as solved. This seems to be a major issue since November and it should be in the FAQs and easy to find with a search.

  • How do I send link using Thunderbird- always defaults to outlook express

    Both my wife and I use this PC my email is via Thunderbird, she uses outlook express. When I try to forward a link in firefox, it always opens outlook express- I want it to come from my account at thunderbird. how do I fix this?

    Try making sure that Thunderbird is set as the program to handle email. You can do that in the [[Options window - Applications panel]]. You might also check this Thunderbird documentation - http://support.mozillamessaging.com/en-US/kb/make-thunderbird-default-mail-client

  • HT201320 when i send an email using my hotmail address through outlook my contacts do not receive the mail. when i send the same mail through my iPad or iPhone no problem my contacts receive the mail. this only problem happens when i send mail with my mac

    I have a hotmail email address. I compose my mail useing MS outlook. when i send the mail to my contacts useing my macbook air,my contacts tell me there have not received the mail.
    when i send the same message with my ipad or iphone no problem my contacts receive the mail.
    what is the problem?

    Blair84 wrote:
    Double check your contacts email, and if its incorrect, go to their contact and change it and save it or you can delete the email you put in, and manually type it in.
    Hope this helps.
    How would that help the original poster?

  • How to sending email from Oracle 6i(Forms)

    How can I send email from Oracle Forms(6i).
    I need to send email to a distribution list(multiple email addresses).

    send email of multiple email address
    [email protected],[email protected],[email protected]
    create or replace function mailout
    (sender in varchar2,
    recipient in varchar2,
    ccrecipient in varchar2,
    subject in varchar2,
    message in varchar2) return number
    is
    crlf varchar2(2) := chr(13)||chr(10);
    connection utl_smtp.connection;
    mailhost varchar2(50) := 'Add email server Ip Address here';
    header varchar2(4000);
    v_num number :=1;
    str number:=0;
    email varchar2(50);
    begin
    connection := utl_smtp.open_connection(mailhost,25);
    header := 'Date: '||to_char(sysdate,'dd mon yy hh24:mi:ss')||crlf||
    'From: '||sender||' '||crlf||
    'Subject: '||subject||crlf||
    'To: '||recipient||crlf||
    'Cc: '||ccrecipient||crlf||message;
    utl_smtp.helo(connection,mailhost);
    utl_smtp.mail(connection,sender);
    utl_smtp.rcpt(connection,recipient);
    while (instr(ccrecipient,',',1,v_num)>0) loop
    email:=substr(ccrecipient,str+1,instr(ccrecipient,',',1,v_num)-str-1);
    dbms_output.put_line(email);
    utl_smtp.rcpt(connection,email);
    str:=instr(ccrecipient,',',1,v_num);
    v_num:=v_num+1;
    end loop;
    utl_smtp.open_data(connection);
    -- utl_smtp.write_data(connection,header);
    utl_smtp.write_data(connection,'MIME-Version:1.0'||crlf||'Content-type:text/html'||crlf||header);
    utl_smtp.close_data(connection);
    utl_smtp.quit(connection);
    return 0;
    exception
    when utl_smtp.invalid_operation then
    dbms_output.put_line('Invalid Operation in SMTP transaction');
    return 1;
    when utl_smtp.transient_error then
    dbms_output.put_line('Temporary problem with sending email ');
    return 2;
    when utl_smtp.permanent_error then
    dbms_output.put_line('Permanent problem with sending email ');
    return 3;
    end;

  • Sending email using IMAP through SMTP Port 587

    Hi,
    I have been sending Mail Merged email to people in organizations that I am active in, using IMAP embedded in StarOffice 5.2 (on Windows 98 Second Edition). This worked fine until a few weeks ago when I received an error message stating that AOL, as part of their anti-spam efforts, was no longer accepting third-party emails on default port 25. All third-party email must now use port 587. I looked in the IMAP dialog and in the Tools -> Options dialog, but did not see any place to change the SMTP port. The AOL error message information page had instructions for changing the port in other applications (Outlook, Eudora, etc.), but not for StarOffice. So, I have some questions:
    1.Is it possible to change the port in StarOffice 5.2?
    2.If not, how does StarOffice 8 send Mail Merged email? Does it use IMAP, and if so, can the port be changed?
    3.Also, I like the integrated configuration in StarOffice 5.2, where database fields can be directly accessed in the Insert -> Fields -> Other dialog. In looking at the Mail Merge section in "SO8_What's New.pdf", it appears that Mail Merge in StarOffice 8 is restricted to predefined fields. Could I still access fields from my existing databases?
    These is a lot of questions, but right now I am blocked from sending Mail Merged emails which is imparing communications with volunteers who are running educational programs. I appreciate any and all help that anyone can provide.

    Please try this out!!!!!!!!!
    You can send emails using Outlook also. You can send email over Microsoft Exchange with this object (or another email server, using IMAP/POP).
    Sub SendMailOutlook(aTo, Subject, TextBody, aFrom)
    'Create an Outlook object
    Dim Outlook 'As New Outlook.Application
    Set Outlook = CreateObject("Outlook.Application")
    'Create e new message
    Dim Message 'As Outlook.MailItem
    Set Message = Outlook.CreateItem(olMailItem)
    With Message
    'You can display the message To debug And see state
    '.Display
    .Subject = Subject
    .Body = TextBody
    'Set destination email address
    .Recipients.Add (aTo)
    'Set sender address If specified.
    Const olOriginator = 0
    If Len(aFrom) > 0 Then .Recipients.Add(aFrom).Type = olOriginator
    'Send the message
    .Send
    End With
    End Sub

  • Why cant I send emails, or open folders, from my Outlook email when using ipad. My Outlook is functioning normally when accessed from laptop.

    Why am I unable to send emails or open folders from my Outlook email when using my iPad?  My Outlook is functioning normally when accessed from my laptop.  This problem has been going on for three days now - everything was functioning normally before. I have looked at the standard troubleshooting suggestions provided by Apple, but they do not appear to cover this eventuality.  I should be most grateful for any help.

    Try first to Clear your cache from : Tools > Options > Advanced > Network, Clear Now button.
    if the above is not helpful, [https://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles create a new profile] and check it again.
    if you create the new profile see: [https://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles#w_recovering-information-from-an-old-profile Recovering information from an old profile]
    thank you

  • Sending email from web forms (Forms 6i)

    Does anyone know how to send email using Outlook from web forms? I can get it working with client server but not with web forms.
    Thanks,
    Darcea Klein
    null

    Many ways to send a email:
    1. use Web.Show_Document(v_url, '_blank') to call a .asp or .php or .cgi page which can send email, attaching some message.
    2. use utl_smtp built_in in Oracle 8i, you can save this procedure in database, then call this procedure in your web form.
    PROCEDURE SEND_EMAIL (sender IN VARCHAR2,
    recipient IN VARCHAR2,
    message IN VARCHAR2)
    IS
    mailhost VARCHAR2(30) := 'smtp.aaaaa.com';
    mail_conn utl_smtp.connection;
    BEGIN
    mail_conn := utl_smtp.open_connection(mailhost, 25);
    utl_smtp.helo(mail_conn, mailhost);
    utl_smtp.mail(mail_conn, sender);
    utl_smtp.rcpt(mail_conn, recipient);
    utl_smtp.data(mail_conn, message);
    utl_smtp.quit(mail_conn);
    -- Handle the error
    END;
    GOOD LUCK

  • Send fax with Oracle Forms

    Hi all !
    I need to send a fax using Oracle Forms 5.0 running on Oracle 8.0.4 database. Somebody already implement something like this and can send to me a sample or an interesting site on the internet to find ??
    Thank you !
    Douglas
    null

    Douglas,
    Check out document id 47498.1, entitled "Programmatically sending a fax/email via Microsoft Exchange" from Metalink.
    Marie

  • Send email with Oracle

    I'm sending email in Oracle 11g with apex_mail.send function. I have below html structure. I have added style for table in this html. but when i open received email, style is not applied to the table. only text is visible.
    How can i solve this ?
    <html>
       <head>
       <style>table{border-collapse:collapse;}table,td,th{border:1px solid grey;}td,th{padding:5px;}</style>
       </head>
       <body>
       <table width="100%">
       <tr>
       <th scope="col">Company</th>
       <th scope="col">Amount</th>
       <th scope="col">Reference</th>
       <th scope="col">Note</th>
       </tr>
       <tr>
       <td>HNB</td>
       <td>226</td>
       <td>..952</td>
       <td>Insurance payment.</td>
       </tr>
       <tr>
       <td>AC</td>
       <td>2150</td>
       <td>..255</td>
       <td>A/C service.</td>
       </tr>
       </table>
       </body>
    </html>

    Hello,
    Which e-mail client you are using to open e-mail?
    If it's MS Outlook 2007 or later, then MS Outlook uses MS Word rendering engine to render HTML. So try to save your HTML into some local file and open it using MS Word. Then you will understand how it;s rendering. Make changes whatever you want using MS word and then use generated HTML to send in e-mail.
    If it's MS Outlook 2003 or earlier, then MS Outlook uses IE to render, then you have to repeat above step from IE.
    If it's some-other client, please refer their documentation on how they render HTML.
    Helpful Links: Microsoft Outlook 2007 Report | Email Standards Project
    Word 2007 HTML and CSS Rendering Capabilities in Outlook 2007 (Part 1 of 2)
    Regards,
    Hari

Maybe you are looking for

  • Pdf form fields populate sporatically

    I have a coldfusion application that populates several dozen fields in a pdf form using the following tags: <cfpdfform action="populate" source="my.pdf">     <cfpdfsubform name="P1">        <cfpdfformparam name="text1" value="test">    </cfpdfsubform

  • How to get random file name?

    Hi everyone,my problem is that I want to get the random file ,namely,I create a new file called "test***.jpg" everytime,how can I get it?how can I use wild character?Thanks in advanece.

  • Volume limit not going higher than about 75% ?

    Hi, I just bought an iPod Classic 160GB after my trusty 30GB Video died, and I was denied service. I seem to be having a little problem with it. When I try and put the volume limit all the way up, it sounds louder then it was, but when I want to acce

  • Quotes

    i have a problem in my program. i have a program that will allow user to enter comment and the comment get inserted into a table. the problem i am having is that when user enter text with quotes, my program fail to insert. if there any way i can esca

  • JNDI params for (default) J2EE naming service.

    Dear All, I am trying to get a client program to access a session bean using JNDI. Could anyone tell me how the naming context should be set up (i.e. what -D command line params to use). Assuming the server Sun's J2EE and beans are deployed using dep