Sending email from K2 Configuration


Badge +2

Hi,

I have a Default Server Event (WF) and from within this I need to send an email.  I have a couple of questions on this

1.  Is there anyway for me to use the MailEvent in K2 that comes by default.  In the Default Server Event (WF) you can use only strictly Windows Workflow Foundation Activities as far as I know.

 2. How do I read the configuration data (configured email server) from code?

 

Thanks

Arjuna.


2 replies

Badge +6

Hi Arjuna,


I guess there are several ways that you can approach this - it depends on how much logic you have in your WF code event? Is it fairly big and complex?


1. You can not call a K2 event from WF code activity - but you can write (or copy paste) code over to the WF code to do the same, however configuration data will be lost.


2. You can only get the configuration data from the server event where the data was configured. In other words if you ran the email event wizard then you can get to the configuration data values only inside that event - not in a different one.

Badge

Hi,

I would also like to know how to get the currently configured mail server. But since I'm creating the process from code I would need it as a K2Field-subtype.

 

any ideas?

thx

Charly

Reply