Debugging K2 workflow - how to view data associated with error conditions? - sharepoint-2010

I have a K2 Blackpearl workflow. In the workflow I populate a process data field with email addresses pulled from a SharePoint list. Using the Text - Join function with the SP List's SmartObject's GetList method for the values and a semi-colon for the separator.
In theory, this should produce a well-formatted string with multiple addresses for the "To" line of the E-mail event. However, I keep receiving a "The specified string is not in the form required for an e-mail address." at the point where the workflow should attempt to send an email.
I've tried using the string "john.doe#company.com;jane.dove#company.com;abc.def#company.com" directly and I've tried splitting the string on the semi-colons in the Activity's destination set. In the first case, there is one instance trying to send the email. In the second instance, the emails are resolved to users and though I select the "ActivityInstanceDestUserEmail" for the "To" line, I still get the error message.
We are using K2 Blackpearl 4.6 with a SharePoint 2010 farm configured strictly for Claims authentication. The users to which I wish to send the email have valid email addresses if resolved using the K2SPS provider, but when the emails are resolved into destination slots, they are resolved into accounts with the K2 provider. I'm guessing that this is the problem with my second method for sending the email. But the first, putting the whole string in the "To" line should have worked it is straight email addresses - no resolving to users is needed.
What am I doing wrong? Is there another way to accomplish this?

Changes in the configuration of our customer security provider, labelled "K2SPS" seem to have resolved the problem - at least for now.

Related

How can I configure EAGetMail DLL options to make date search work?

Hi everyone and thanks in advance for taking the time reading my question.
I have this scenario: I'm using EAGetMail DLL to retrieve emails from a POP3 e-mail server. I have used an example given on the website and so far so good; I can get all the emails from my inbox.
My problem arises when I try to use the data filters that the DLL provides, in order to not get all the emails in the inbox, just a few, using a certain data range.
The code that I'm using for this purpose is the following:
Dim oClient As New MailClient("TryIt")
oClient.Connect(oServer)
Dim options As GetMailInfosOptionType
options = options Or GetMailInfosOptionType.DateRange
options = options Or GetMailInfosOptionType.OrderByDateTime
oClient.GetMailInfosParam.Reset()
oClient.GetMailInfosParam.GetMailInfosOptions = options
oClient.GetMailInfosParam.DateRange.SINCE = System.DateTime.Now.AddDays(-4)
oClient.GetMailInfosParam.DateRange.BEFORE = System.DateTime.Now.AddDays(1)
Theoretically this should retrieve only the emails within last four days from today, but it is not working. Everytime I execute the code I get every e-mail from my inbox.
Has someone faced something similar to this?
The first sentence on this page, regarding the MailClient.GetMailInfosParam property, says that POP3 is not supported:
Search email on IMAP4 Server and MS Exchange Server. It doesn't
support POP3 protocol.

Exim - identify recipient BCC address

I'm using plus-addressing on Exim to create an automated system - I will process emails based on the local part of the address. So eg:
From: me#eximdomain.com
To: robot+project-4#eximdomain.com
This works well - I can process it based on the To address (specifically project-4). But ideally I want to be able to BCC an email to this address, eg:
From: me#eximdomain.com
To: somebody#otherdomain.com
Bcc: robot+project-4#eximdomain.com
When I am checking the mailbox for robot, I see the message, but nowhere in the header is the actual address that got it there, ie robot+project-4#eximdomain.com - so I cannot process it.
Obviously I do not want somebody#otherdomain.com to be aware of this address; but when robot#eximdomain.com receives it, I want to know that it was actually BCCd to robot+project-4#eximdomain.com (in some/any header).
Is there any way to do this?
Figured this out, if anyone comes across this: added this option to my local delivery transport (Dovecot LMTP in my case):
envelope_to_add = true
It then generates an Envelope-to header containing the incoming address.

Email alias from LegacyExchangeDN - LDAP

I am working with Exchange EWS API. The API returns me a value which is legacyExchangeDN. The value looks like this -
/o=Amazon/ou=Exchange Administrative Group (FYDXXXXXXXXDLT)/cn=Recipients/cn=b08141c097dfd32432klbva43595-email-list
The value is also cropped in some cases (last few characters are not returned by the API)
How can I convert this value into meaningful email address?
Usually you would see this when you make a findItems request because Exchange doesn't resolve the Native (EX) Addresses back to SMTP addresses in this operation. So if you make a GetItem (or Load/Loadpropertiesforitems) request on the particular item you want to look at it as long as that address can be resolve in the GAL (eg that user or object hasn't been deleted) it should return the resolved address. The other option is to use the ResolveName operation https://msdn.microsoft.com/en-us/library/office/dn645423(v=exchg.150).aspx

wfNotify in IDOC to send mail | csScriptMustBeInWorkflowContext

I have created & called a custom service in my custom template to send mails to users when document gets sent/reject/approve. I want to copy myself in BCC in these mails so that in case of any issues, i could cross check. is there a way i can enter a specific mail address in this code. below is the code i 'm using. Will "wfNotify" be of any help?
code used
<$executeService("APPROVAL_MAIL_PILOT_USERS")$>
<$loop IS_PILOT_USER$>
<$userValue=IS_PILOT_USER.USEREXISTS$>
<$endloop$>
<$if strEqualsIgnoreCase(userValue,"1")$>
----MailFormat----
P.S- when i use wfNotify -> , i get the error
Caused by: intradoc.common.ServiceException: !csScriptMustBeInWorkflowContext,wfNotify
*ScriptStack !csDynHTMLStackDumpStart,pbhati,(datasummary)IdcService=WORKFLOW_SENDTO\,dDocName=D_1247583\,dID=1421894!$
!csDynHTMLNoStack!$
!csDynHTMLErrorMessage,/u01/Oracle/Middleware/user_projects/domains/base_domain/ucm/cs/custom/Workflow/templates/Workflow_reviewer_mail.htm,44,3!csDynHTMLReportMsgFunction,wfNotify!$
-><$wfNotify(xDocOwner,"user")$>
As far as I know, wfNotify can only be called from inside a workflow event which is why you are receiving the csScriptMustBeInWorkflowContext error.
As to a service or Idoc Script function (besides wfNotify) that can be used to send an email to a specific user/alias/token and use a custom template, I could not locate one.
You could create your own scriptable service (which you can then call from Idoc Script) or an Idoc Script function that would allow for this.
You can call wfNotify with the specific username.
But the user must have their email details completed in the user table.
Your second error with the wfNotify call - are you calling wfNotify with a 3rd param for the template?
If so - eliminate this as a source of your problem by just calling wfNotify with the first two params.
wfNotify Oracle Documentation

email header "from" containing first and last names, not sender's email

I'm reading emails from pop3 server with zend mail component.
What I want is to know who is sent this email and when I try $message->from I see "FirstName LastName" without senders email.
I do print_r($message->getHeaders()) and do not see sender's email in any header from this email.
I thought that senders email is required and always must be set. Anything wrong here?
Is that possible to have email with "from" header with only First/Last name without email?
As per my comment:
if you print_r() a valid from header and the address is in angle brackets, you may only see it by viewing the HTML source, because the angle brackets and email address may be treated as an (albeit unrecognised) HTML tag, by the browser.
However, if anyone encounters this issue in the future (and the email address does not show in the HTML source), it is worth bearing in mind that the sender could have sent an email without a From: address, even though that is technically invalid.
Yes, this is totally possible. There are 2 usually "FROM" addressess with every email. 99% of the time, these are the same values, but they can be different. There is the MAIL FROM address that is used during the SMTP session, that issues the MAIL FROM command. Then, there is the FROM address found in the email message headers (this FROM address is sent during the SMTP DATA command). This is how you can get email spoofing.
Think of it this way (in the snail mail physical world). You can have a FROM address on the outside of an envelope (this would be equiv to the MAIL FROM command). This is supposed to be the person sending the message. You can then have a FROM value that is different on the letter head that is inside the envelope. This would be the FROM value you are seeing in the email headers.
Here is an example of some raw headers without a FROM address
From: "Steve James"
To: "John Doe" <you#yourcompany.com>
Date: Fri, 24 Feb 2012 07:43:40 -0800
Subject: Here is the progress report
....
Hopefully I didn't make that about as clear as mud.
--
Use the following format:
Firstname Lastname <vasya#poupkine.com>