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 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?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

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.

share|improve this answer
    
Here are the instructions: technet.microsoft.com/en-us/library/cc263462.aspx –  John Chapman May 2 '12 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 Dwyer May 2 '12 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 Dwyer May 2 '12 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. –  John Chapman May 2 '12 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. –  Per Jakobsen May 3 '12 at 17:37

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.