on 08-09-2011 1:57 PM
Hi All,
I am working on requirement for triggering of mail to a user who created the project (i.e the owner )so that he will have details stored in his/her mail box .
As of now,by default, the sourcing system is triggering mails to the collaborators when ever I add them to a project.
For my requirement , I need to use scripting for the Document Life Cycle Context which has Created and Duplicated Events But I would then require to write code for triggering mail in the Scripting Definition which I dont have much idea about .
Any other help/way to do is appreciated!
Regards,
Uday!
Resolved.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I have used the following code in triggering mail .
.
.
Properties properties = new Properties();
Session session1 = Session.getDefaultInstance(properties, null);
.
.
.
and after careating the MIME message , I am sending it using Transport.send(message); where message is MIMEMessage.
I am getting the following error when executing the script i.e Access to Default Session is defined and the stack trace is
java.lang.SecurityException: Access to default session denied
at javax.mail.Session.getDefaultInstance(Session.java:311)
at com.sap.odp.comp.messaging.daemon.ScheduleMailEventDaemon.sendMail(ScheduleMailEventDaemon.java:408)
at com.sap.odp.comp.messaging.daemon.ScheduleMailEventDaemon.processHook(ScheduleMailEventDaemon.java:246)
at com.sap.odp.comp.daemon.AbsTransientEventDaemon.process(AbsTransientEventDaemon.java:85)
at com.sap.odp.comp.daemon.ResponsibleTransientEventDaemon.process(ResponsibleTransientEventDaemon.java:167)
at com.sap.odp.comp.daemon.SystemEventServiceManager$TransientEventExecutor.run(SystemEventServiceManager.java:1937)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
I have included the necessary jar files in server ,included the necessary imports and asked the basis team to restart the server too.
Before restarting the server I was getting Method invocation to getDefaultInstance has failed, Now I get access to default session is denied.
Any help is appreciated.
Regards,
Uday.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanx for quick reply Devesh , I was caught up in some other issue in sourcing server. I am working on your way and indeed its easy. I shall get back to you if i get any other issue when I am done
Regards
Uday.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Uday,
Sending e-mail to the user who creates a business doc has become one of the common requirements from clients these days.
As you said, this can be achieved by wirting custom code. I am not aware of any other configurations that allows this functionality. Maybe the forum can suggest some alternate approaches, if there are any.
For the custom development approach, I would suggest looking java.mail APIs. I can assure that this approach will work out easliy.
Thanks
Devesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.