Home » Developer & Programmer » Forms » send email through Form 6i
send email through Form 6i [message #627413] Tue, 11 November 2014 13:33 Go to next message
HZAA
Messages: 13
Registered: November 2014
Junior Member
did any one try to send email form Form Builder 6i
for Example when click the button send email.
Re: send email through Form 6i [message #627419 is a reply to message #627413] Tue, 11 November 2014 15:24 Go to previous messageGo to next message
mughals_king
Messages: 392
Registered: January 2012
Location: pakistan
Senior Member

its easy to handle in forms 6i to send Email if you need FMB file i can send you.


Declare
  Outlook_Object OLE2.OBJ_TYPE;
  Mail_Object OLE2.OBJ_TYPE;

  Item1 OLE2.OBJ_TYPE;
  Item2 OLE2.OBJ_TYPE;

  OLEPARAM ole2.list_type;

  var_Send OLE2.OBJ_TYPE;

  var_Attach1 OLE2.OBJ_TYPE;
  var_Attach2 OLE2.OBJ_TYPE;

BEGIN
SET_APPLICATION_PROPERTY(CURSOR_STYLE,'BUSY');

  Outlook_Object := OLE2.CREATE_OBJ('Outlook.Application'); 

  OLEPARAM := OLE2.CREATE_ARGLIST;
  OLE2.ADD_ARG(OLEPARAM,'MAPI');
  Mail_Object := OLE2.INVOKE_OBJ(Outlook_Object,'GetNameSpace',OLEPARAM);
  OLE2.DESTROY_ARGLIST( OLEPARAM );

--newMail
  OLEPARAM := OLE2.CREATE_ARGLIST;
  OLE2.ADD_ARG(OLEPARAM,0);
  Item1 := OLE2.INVOKE_OBJ(Outlook_Object,'CreateItem',OLEPARAM);
  OLE2.DESTROY_ARGLIST( OLEPARAM );

-- If you want to display outlook new message screen
-- Item2 := OLE2.INVOKE_OBJ(Item1,'Display');

  ole2.set_property(Item1,'To',:To);
  ole2.set_property(Item1,'Subject',:Subject);
  ole2.set_property(Item1,'Body',:Body);

-- If user has selected an attachment then add it with message.
  
  Go_Block('Attachments');
  First_Record;
  Loop 

      If :System.Last_Record = 'True' OR :Attachment IS NULL Then
        Exit;
      Else

        var_Attach1 := OLE2.GET_OBJ_PROPERTY(Item1,'Attachments');
        OLEPARAM := OLE2.CREATE_ARGLIST;
        OLE2.ADD_ARG(OLEPARAM,:Attachment);
        var_Attach2 := OLE2.INVOKE_OBJ(var_Attach1,'add',OLEPARAM);
        OLE2.DESTROY_ARGLIST( OLEPARAM );

    End If;
    Next_Record;
  End Loop;


  var_Send := OLE2.INVOKE_OBJ(Item1,'Send');

  OLE2.RELEASE_OBJ( Item1);
  OLE2.RELEASE_OBJ( Mail_Object );
  OLE2.RELEASE_OBJ( Outlook_Object );

SET_APPLICATION_PROPERTY(CURSOR_STYLE,'DEFAULT');
Message('Mail sent seccessfully.........');
Message('Mail sent seccessfully.........');


END; 



Regard
Mughal
Re: send email through Form 6i [message #627541 is a reply to message #627419] Wed, 12 November 2014 11:46 Go to previous messageGo to next message
CraigB
Messages: 386
Registered: August 2014
Location: Utah, USA
Senior Member
Quote:
did any one try to send email form Form Builder 6i
for Example when click the button send email.

How do you want to send email? Mughal's example assumes you are using Microsoft Outlook as your Email client. But what if you are not using Outlook? I personally prefer to send email through a database package - then it doesn't matter which email client is installed on the client workstation. Depending on your database version you can use either the UTL_SMTP or the UTL_MAIL package. Search the internet for "How to send email from Oracle" and you will get numerous examples.

Craig...
Re: send email through Form 6i [message #627546 is a reply to message #627541] Wed, 12 November 2014 12:02 Go to previous messageGo to next message
HZAA
Messages: 13
Registered: November 2014
Junior Member
Thank you Mr. CraigB and Mr. Mughal's
I am using Microsoft Outlook and At this time I want to use Microsoft Outlook and in the future maybe I will use Database Package.
but can anyone help me more about the code.
which place In the code for Email Addrss and for Contents of the text.
Re: send email through Form 6i [message #627551 is a reply to message #627546] Wed, 12 November 2014 12:29 Go to previous messageGo to next message
CraigB
Messages: 386
Registered: August 2014
Location: Utah, USA
Senior Member
Quote:
but can anyone help me more about the code.
which place In the code for Email Addrss and for Contents of the text.

That's already in the code...
  ole2.set_property(Item1,'To',:To);  -- This is the parameter for the TO email address
  ole2.set_property(Item1,'Subject',:Subject);  -- This is for the Subject line.
  ole2.set_property(Item1,'Body',:Body); -- This is for the contents or Body of the email...

Also, use this Internet Search: "Oracle Forms how to send email through Outlook" for numerous examples.

Craig...


Re: send email through Form 6i [message #627572 is a reply to message #627551] Wed, 12 November 2014 14:36 Go to previous messageGo to next message
mughals_king
Messages: 392
Registered: January 2012
Location: pakistan
Senior Member
Yes Mr @craigB is right you must have to configure outlook Express i forgot to tell you so Have you solved your problem or should i upload .FMB file
Re: send email through Form 6i [message #627637 is a reply to message #627572] Thu, 13 November 2014 09:59 Go to previous messageGo to next message
HZAA
Messages: 13
Registered: November 2014
Junior Member
I work in a company ,they have Exchange server( outlook email server)and all users client use outlook email.
do you mean this configuration of email.
if you can send fmb file.
Re: send email through Form 6i [message #668402 is a reply to message #627419] Thu, 22 February 2018 00:14 Go to previous messageGo to next message
usmandeveloper
Messages: 1
Registered: February 2018
Junior Member

Dear

I am doing work on this task,
need us to fmb form for send email from form 6i.
Re: send email through Form 6i [message #668471 is a reply to message #668402] Mon, 26 February 2018 23:10 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
usmandeveloper wrote on Wed, 21 February 2018 22:14

Dear

I am doing work on this task,
need us to fmb form for send email from form 6i.
WOW!
Four year old thread.
Forms 6i has been obsoleted at least a decade.
Please join 21st Century at your earliest convenience.
Re: send email through Form 6i [message #668485 is a reply to message #668471] Tue, 27 February 2018 10:36 Go to previous messageGo to next message
Jamaluddin
Messages: 3
Registered: January 2018
Junior Member
You are right. 6i is obsolete version, but still many organizations, including some government institutions still using this. Razz
Re: send email through Form 6i [message #668502 is a reply to message #668485] Tue, 27 February 2018 13:27 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
Jamaluddin wrote on Tue, 27 February 2018 08:36
You are right. 6i is obsolete version, but still many organizations, including some government institutions still using this. Razz
You are free to provide solutions to this & any similar questions.
Re: send email through Form 6i [message #673502 is a reply to message #627419] Wed, 21 November 2018 10:55 Go to previous messageGo to next message
King United
Messages: 1
Registered: November 2018
Junior Member
please send me fmb file. on my email - mohansaini721@gmail.com
Re: send email through Form 6i [message #673503 is a reply to message #673502] Wed, 21 November 2018 11:27 Go to previous message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
Please do not plan on getting the requested FMB file since mughals_king last visited this forum in March 2018.
Previous Topic: WEBUTIL_FILE.FILE_SELECTION_DIALOG_INT will not work
Next Topic: uploading an image in 10g
Goto Forum:
  


Current Time: Tue Dec 07 08:41:35 CST 2021