Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a Sharepoint 2010 installation and a Active Directory and a Exchange.

I have design an Approval Workflow which sends emails to the approvers. It works perfectly with some users I have tried as approvers, they receive the email about the approval process perfectly.

The problem is that it doesn't work with the real approver. He doesn't receive any email from Sharepoint. All the users I have tested are Active Directory and Exchange users and their email accounts are working ok, from inside the organization and from outside.

How can I debug the process of sending an automatic email from Sharepoint??

Update 1 I'm logging the SMTP server, and Sharepoint always sends an email with any approver except with one. I can't find where the problem is. The user has an email in AD and when you see his profile in Sharepoint it has the same email, however SharePoint doesn't send him an email.

Updae 2 I've enabled diagnostic logging in Sharepoint and I've found a relevant line when Sharepoint has to send the email. Is this:

Coercion (MultiEmailAddressSemicolon) warning: E-mail address not found for DOMAIN\ProblematicUser

The user has an email address in AD, and If i visit his Sharepoint profile I can see his email address. Some help?

References: Thanks to this I learnt how to enable diagnostic logging

share|improve this question
add comment

4 Answers

You can search for SharePoint logs. ULS viewer is one of the best viewer for the logs. Also I think you can try to write user e-mail information to the WorkFlow history.

ULS Viewer

share|improve this answer
    
I can't find any information about this in ULS viewer :( How to write info into de Workflow History? –  Tomás Crespo May 25 '13 at 6:43
add comment

I had this happen once, I think the AD record was missing an Email address.

share|improve this answer
    
It isn't that, the email record in the AD object has the correct email. I even has changed it for other email address and doesn't works either. –  Tomás Crespo May 25 '13 at 6:42
add comment

Here's some quick code from one of my projects:

    // LogComment logs messages to the workflow history list.  Calling this method gives the category "Update"
    private void LogComment(string logMessage)
    {
        LogToWorkflowHistoryList(logMessage, "Update");
    }

    // LogException logs messages to the workflow history list.  Calling this method gives the category "Exception"
    private void LogException(string logMessage)
    {
        LogToWorkflowHistoryList(logMessage, "Exception");
    }
    // LogToWorkflowHistory exposes a way to log a comment to the workflow history list (as defined in the SP WF CFG)
    private void LogToWorkflowHistoryList(string logMessage, string commentCategory)
    {           
        SPWorkflow.CreateHistoryEvent(WorkflowProperties.Web, this.WorkflowInstanceId, 0, WorkflowProperties.Web.CurrentUser, new TimeSpan(), commentCategory, logMessage, string.Empty);
    }

Edit: this was meant to be a reply to a comment from the OP.

share|improve this answer
add comment
up vote 0 down vote accepted

Finally I managed this deletening the user, so Sharepoint re-query Active Directory and now is working.

How to delete the user in Sharepoint?

Site Action>>Site Settings>>Site Permission>> Open any group replace URL as shown below

Original URL: https://testsite/_layouts/people.aspx?MembershipGroupId=4 Replaced URL: https://testsite/_layouts/people.aspx?MembershipGroupId=0

Then you can able to access user information list, Select user >>Action >delete users from site collection level

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.