Wednesday, 7 May 2014

Change outgoing Email settings in SharePoint 2013

I have configured Outgoing Email settings in SharePoint 2013. But the FROM email id in the mail shows another Email ID, what actually I have configured in Outgoing Email settings in SharePoint Central Admin.

Root Cause :

    The web application which triggers the mail has different email ID what we configured in the SP Central Admin.

PowerShell cmd to check OutboundMailSenderAddress,

 (Get-SPWebApplication http://SPWebApp).OutboundMailSenderAddress

Check for both, web app and Central Admin URL.

Solution:

I have updated the OutboundMailSenderAddress mail address using SP Management Shell,

$webApp = Get-SPWebApplication "http://SPWebApp"

$webApp.OutBoundMailReplyToAddress = "no-reply@suglog4.net"

$webApp.OutboundMailSenderAddress = "sharepoint2013@suglog4.net"

$webApp.IncomingEmailServerAddress = "suglog4Mail"

$webApp.Update()

Note : If you have more than one WFE and APP server run the above script line for all the servers and check whether the OutboundMailSenderAddress user has updated.

Now check the both the SP Central Admin and  Web App OutboundMailSenderAddress user's are same.

PowerShell cmd to check,

 (Get-SPWebApplication http://SPWebApp).OutboundMailSenderAddress

Cannot connect to the configuration database



My Issue:

 Cannot connect to the configuration database

1. SQL services is in start state, but Restarted the SQL services
2. Checked AppPool in IIS and restarted all the web sites and AppPools are looking good. But still got same error. 

3. Checked the Event viewer it shows the below error.

Cannot connect to SQL Server. machine name not found. Additional error information from SQL Server is included below.Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.

4. Tried to Login SQL using Windows authentication login failed and got response  "Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding."

5. But SA account Login successfully.

Solution:

Checked DC it was shutdown. Switched on the DC and everything back normal