Ask Experts Questions for FREE Help !
Ask
    cheenu's Avatar
    cheenu Posts: 1, Reputation: 1
    New Member
     
    #1

    Dec 16, 2006, 12:50 AM
    Sending email thrrough oracle forms
    How I can send ane email through oracle 10g forms ?
    abdhalm's Avatar
    abdhalm Posts: 2, Reputation: 1
    New Member
     
    #2

    Apr 3, 2007, 04:40 AM
    Declare

    objOutlook CLIENT_OLE2.OBJ_TYPE;
    objMail CLIENT_OLE2.OBJ_TYPE;
    objArg CLIENT_OLE2.LIST_TYPE;
    objAttach CLIENT_OLE2.OBJ_TYPE;

    BEGIN

    objOutlook := CLIENT_OLE2.CREATE_OBJ('Outlook.Application');

    -- Previous example usually used 'mapi.session' but this doesn't work correctly
    --anymore.
    objarg := CLIENT_OLE2.CREATE_ARGLIST;
    CLIENT_OLE2.ADD_ARG(objarg,0);

    objMail := CLIENT_OLE2.INVOKE_OBJ(objOutlook,'CreateItem', objarg);
    CLIENT_OLE2.DESTROY_ARGLIST(objarg);

    objAttach := CLIENT_OLE2.GET_OBJ_PROPERTY(objmail, 'Attachments');

    objarg := CLIENT_OLE2.CREATE_ARGLIST;
    CLIENT_OLE2.ADD_ARG(objarg,'c:\temp\test.txt'); -- filename

    CLIENT_OLE2.SET_PROPERTY(objmail,'To','Joe.Friday@ oracle.com');

    CLIENT_OLE2.SET_PROPERTY(objmail,'Subject','Email sent from Oracle Forms 9i');
    CLIENT_OLE2.SET_PROPERTY(objmail,'Body','This is an email that was sent using
    CLIENT_OLE2 from Oracle forms 9i');
    CLIENT_OLE2.INVOKE(objattach, 'Add', objarg);
    CLIENT_OLE2.INVOKE(objmail,'Send');

    CLIENT_OLE2.RELEASE_OBJ(objmail);
    CLIENT_OLE2.RELEASE_OBJ(objOutlook);
    CLIENT_OLE2.DESTROY_ARGLIST(objarg);

    END;

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

How I can send email through Oracle 6i Forms? [ 2 Answers ]

How I can send ane email through oracle 6i forms ?

Sending email from oracle forms 10g [ 0 Answers ]

Hi, Using client_ole2 function of webutil I was trying to send mail. But I am getting a popup saying "A program is trying to automatically send mail on your behalf. Do you want to allow this?". After pressing yes the mail is sent to the recipient. I don't want this popup to come. Can anyone help...


View more questions Search