Home » Developer & Programmer » Forms » how can i e-mail the information stored in form to a perticular mail id
|
Re: how can i e-mail the information stored in form to a perticular mail id [message #80519 is a reply to message #80516] |
Sun, 06 October 2002 23:44 |
Enno Oost
Messages: 12 Registered: October 2001
|
Junior Member |
|
|
Hi Rishi,
I'm using the following procedure to create an E-Mail in my programm. All you have to do is to source the parameters from your form-fields.
PROCEDURE f_email_send( p_target_adresse IN VARCHAR2
, p_copy_adresse IN VARCHAR2
, p_blindcopy_adresse IN VARCHAR2
, p_subject IN VARCHAR2
, p_message IN VARCHAR2
) IS
v_outlook_obj OLE2.OBJ_TYPE;
v_outlook_arg OLE2.LIST_TYPE;
v_email_obj OLE2.OBJ_TYPE;
BEGIN
-- OLE2-Object as Container for MS-Outlook.
v_outlook_obj := OLE2.CREATE_OBJ( 'Outlook.Application' );
v_outlook_arg := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG( v_outlook_arg, 0 );
v_email_obj := OLE2.INVOKE_OBJ( v_outlook_obj, 'CreateItem', v_outlook_arg );
-- With OLE2-Outlook-Container create E-Mail.
OLE2.SET_PROPERTY( v_email_obj, 'To', p_target_adresse );
IF LENGTH( LTRIM( p_copy_adresse )) > 0 THEN
OLE2.SET_PROPERTY( v_email_obj, 'Cc', p_copy_adresse );
END IF;
IF LENGTH( LTRIM( p_blindcopy_adresse )) > 0 THEN
OLE2.SET_PROPERTY( v_email_obj, 'Bcc', p_blindcopy_adresse );
END IF;
OLE2.SET_PROPERTY( v_email_obj, 'Subject', p_subject );
IF LENGTH( LTRIM( p_message )) > 0 THEN
OLE2.SET_PROPERTY( v_email_obj, 'Body', p_message );
END IF;
-- Send E-Mail.
OLE2.INVOKE( v_email_obj, 'Send' );
-- Clean-Up.
OLE2.RELEASE_OBJ( v_email_obj );
OLE2.DESTROY_ARGLIST( v_outlook_arg );
OLE2.RELEASE_OBJ( v_outlook_obj );
END;
Bye ... Enno
P.S: Lately I found out, that MS2000 displays a message "... programm wants to send an E-Mail ... OK or Cancel". Until now, I haven't found a way, to stop MS2000 from doing this.
|
|
|
Not working [message #81016 is a reply to message #80519] |
Thu, 26 December 2002 05:22 |
Girish
Messages: 16 Registered: September 1998
|
Junior Member |
|
|
I'm using the following procedure to create an E-Mail in my programm. All you have to do is to source the parameters from your form-fields.
PROCEDURE f_email_send( p_target_adresse IN VARCHAR2
, p_copy_adresse IN VARCHAR2
, p_blindcopy_adresse IN VARCHAR2
, p_subject IN VARCHAR2
, p_message IN VARCHAR2
) IS
v_outlook_obj OLE2.OBJ_TYPE;
v_outlook_arg OLE2.LIST_TYPE;
v_email_obj OLE2.OBJ_TYPE;
BEGIN
-- OLE2-Object as Container for MS-Outlook.
v_outlook_obj := OLE2.CREATE_OBJ( 'Outlook.Application' );
v_outlook_arg := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG( v_outlook_arg, 0 );
v_email_obj := OLE2.INVOKE_OBJ( v_outlook_obj, 'CreateItem', v_outlook_arg );
-- With OLE2-Outlook-Container create E-Mail.
OLE2.SET_PROPERTY( v_email_obj, 'To', p_target_adresse );
IF LENGTH( LTRIM( p_copy_adresse )) > 0 THEN
OLE2.SET_PROPERTY( v_email_obj, 'Cc', p_copy_adresse );
END IF;
IF LENGTH( LTRIM( p_blindcopy_adresse )) > 0 THEN
OLE2.SET_PROPERTY( v_email_obj, 'Bcc', p_blindcopy_adresse );
END IF;
OLE2.SET_PROPERTY( v_email_obj, 'Subject', p_subject );
IF LENGTH( LTRIM( p_message )) > 0 THEN
OLE2.SET_PROPERTY( v_email_obj, 'Body', p_message );
END IF;
-- Send E-Mail.
OLE2.INVOKE( v_email_obj, 'Send' );
-- Clean-Up.
OLE2.RELEASE_OBJ( v_email_obj );
OLE2.DESTROY_ARGLIST( v_outlook_arg );
OLE2.RELEASE_OBJ( v_outlook_obj );
END;
Bye ... Enno
I used the above code. Though no errors, nothing happens, no mail is sent.
|
|
|
Goto Forum:
Current Time: Sat Jan 18 23:03:07 CST 2025
|