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

    Dec 31, 2005, 11:23 PM
    Send mail from oracle forms
    Hello

    How can I send a mail from oracle forms

    Regards
    Swapna
    abdhalm's Avatar
    abdhalm Posts: 2, Reputation: 1
    New Member
     
    #2

    Apr 3, 2007, 04:41 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;
    jai soni's Avatar
    jai soni Posts: 1, Reputation: 1
    New Member
     
    #3

    Dec 11, 2007, 09:51 PM
    I am unable to call the variable defined in declare section.
    error like: CLIENT_OLE2.OBJ_TYPE must be declared

    give solution immediately.


    Quote Originally Posted by abdhalm
    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 ?


View more questions Search