Home » Developer & Programmer » Forms » Sending Multiple Mails from forms and reports
Sending Multiple Mails from forms and reports [message #78179] Wed, 23 January 2002 22:49 Go to next message
Phil
Messages: 32
Registered: March 2001
Member
Send mail from forms and reports
Hello
Does any one know if one can send the same e-mail to multiple addressess, I've tried seperating them with a semi-colon ';' as you would in a normal mail, that doesn't seem to work.
Also does any one know if you use Ole2 to send a mail
with a form running on a web server,if the mail is
sent using the client or the server mail program.

Any answers to these most baffling questions will be most appreciated.

Thanks
Phil
Re: Sending Multiple Mails from forms and reports [message #78182 is a reply to message #78179] Thu, 24 January 2002 08:04 Go to previous messageGo to next message
Srinivas Konda
Messages: 29
Registered: October 2001
Junior Member
create two blocks in MAIN and ATTACHMENTS in your form and write the following code under a send button.
You can send email to multiple people.
This will only work in Client Server envionment.

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

:main.to := replace(:main.to,',',';');

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');
-- to display new email, comment the above and uncomment the below.
-- var_Send := OLE2.INVOKE_OBJ(Item1,'Display');


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

message('Email Sent Successfully ...');message('Email Sent Successfully ...');
SET_APPLICATION_PROPERTY(CURSOR_STYLE,'DEFAULT');

END;
Re: Sending Multiple Mails from forms and reports [message #79126 is a reply to message #78182] Tue, 30 April 2002 05:27 Go to previous messageGo to next message
Nisar Ibrahim
Messages: 3
Registered: April 2002
Junior Member
What can we do if there are multiple attachments?
Re: Sending Multiple Mails from forms and reports [message #79130 is a reply to message #79126] Tue, 30 April 2002 12:04 Go to previous messageGo to next message
Srinivas Konda
Messages: 29
Registered: October 2001
Junior Member
Create your own block multi record block called attachments, from there you can attach your own attachments as many as you want. Write the above code under send email button.
Print Style Form [message #81484 is a reply to message #78182] Sat, 22 February 2003 11:30 Go to previous message
Roopesh
Messages: 7
Registered: January 2003
Junior Member
Actually I am having some error while printing Character mode D2K report through W2K Client. Some one told me to Change the Number of rows in the Print Style Form to 57.

Where is this Print Style Form?
Previous Topic: how to connect oracle forms to ms-access,ms-excell
Next Topic: Re: How to use a Progress bar object in Oracle Form to daniel
Goto Forum:
  


Current Time: Fri Dec 03 06:25:30 CST 2021