Skip to main content
in the k2.net studio ,I added a Server Mail event to a activity named as "Declined Notification"

right clicked the event and opened the "property" window.
choose "Title"->"Event Item" , converted to "Mail Content" tab page ,
first , write "fanghui@beautybeard.com" in the "From" field,
second,for the "Email address", I chosed "Originator" radio ,
finally, written some info in the "Subject" and "Body" field.

then I start a instance of the process,
the instance didn't produce errors until it arrived the activity "Declined Notification",the error resulted in the following:
first , the state of the instance is "Error"
second, email wasn't sent.

I don't know the reason ,then I changed the property of the Server Mail event as the following :

From: fanghui@beautybeard.com
Email Address : fanghui@beautybeard.com
Subject : regarding your request
Content: Your Email is [{K2.ProcessInstance.Originator.Email}]

from the Content field , maybe you can understand my intension.
I want to send the Originator's Email Address to me as content of a email.
To do so , I can know where is the resource of the error.

I run another new instance of the process ,
as a result ,the instance works normally and I received the email .
the content of the email is :
Your Email is

the [{K2.ProcessInstance.Originator.Email}] is empty !
why ?

I checked the AD Manager only to find the field Email of the Originator is fanghui@beautybeard.com.

but why k2.net process can not get it correctly ?

other functions of the process is normal except this event , exactly, the field "Email Address" of the event.

what is the possible reason .

Your kind reply will be appriated

Thank you
Hello,
You can do this through this way:
add a datafield to the process and at a certain activity (you decide) you need to add a server event code that fills that field with the originator's email.

at the event which sends the email, you can browse to that data field and add it to the message body.

hope this solve the problem.
Are you sure that the originator was captured correctly (in some cases, the originator may be anonymous). You should be able to see the originator of the process using the K2 workspace reports.

There is also a useful email troubleshooting article on the K2.net Knowledge base:
http://kb.k2workflow.com/Articles/KB000039.aspx
Hello ,thank you very much for your reply.
I tried but failed.
I have get the Name of the originator successfully .
but I can't get other properties of the orginator.
I don't know the reason.

I have checked the net configuration and other envionment elements only to find that they are all ok.

I don't know why i can not do it successfully .

wish your warm-hearted reply

thank you

Reply