Mail to destination user

  • 25 November 2008
  • 2 replies
  • 0 views

Badge +4

Hi,


I am setting destination users on an activity from code behind in the destination rule.


the problem which I am facing is with the task notification.


Task notifications are not going through.


I am getting an exception saying the string is not in the format of email address.


Similarly in an email event, in the To list, I have provided an repeating xml field which will have names of people but i get the same exception as above.


I debugged the code and found that it fails at this particular line of code


this

.EmailMessage.To.Add(new MailAddress(userEmail));


I believe k2 tries to convert the usernames provided in the xml variable directly to email address.


Usernames are provided as domainusername in the xml variable.


Does K2 not do an AD search to get the email address of the user?


Please reply asap as it is becoming a critical issue for my work. 


Regards,


Ritesh


2 replies

Badge +9

I have found that if I want to send an email to users which are stored in an xml field, that I have to actually specify the email address, rather than the domainusername.

Probably not what you wanted to hear....

Badge +4

Hi Arduk,


It is definetely not what I wanted to hear.


Now I will have to do a AD query myself and fetch the mail addresses for all the users and again store them in some process variable.


This is a overhead to be frank.


I think K2 should handle this.


For time being, I will have to do this as it needs to be delivered.


Thanks for your response.


Regards,


Ritesh

Reply