2

I have a workflow that uses a SendEmail activity, then moves on to some other work. If I get this error below (because the smtp server is down for some reason):

The e-mail message cannot be sent. Make sure the outgoing e-mail settings for the server are configured correctly.

I would like the workflow to terminate instead of continuing on. How would I do this?

1 Answer 1

3

It looks like outgoing email has not been configured in Central Administration. You just need to setup your outgoing SMTP server settings.

EDIT

The accepted answer is actually in the comments below. Though, the above solution is something that should also be checked.

10
  • Here are the instructions: technet.microsoft.com/en-us/library/cc263462.aspx Commented May 2, 2012 at 19:23
  • Actually, it was (and is) configured correctly. The ability for the sharepoint server to communicate with the SMTP server was disrupted for a period of time. I would like to be able to terminate the workflow if this happens again.
    – Chris
    Commented May 2, 2012 at 20:04
  • In fact, I went digging into the Sharepoint log: "Cannot connect to SMTP host ...". The "..." is the correct name of the SMTP server, it just wasn't able to get to it for a period of time.
    – Chris
    Commented May 2, 2012 at 20:09
  • 1
    You could install the SMTP service on the SharePoint server itself that forwards the mail to your main SMTP server. Then configure SharePoint to use itself. It will queue the mail until it can be emailed out. Commented May 2, 2012 at 20:31
  • 1
    Sorry but the OOTB SendEmail activity has been coded to swallow any error and just write an event to the history list. So your only option to catch that error would be to read through the log, but it's a lot easier to write a custom activity which uses SPUtility.SendEmail directly and reports any error. Commented May 3, 2012 at 17:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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