SharePoint 2019 - unable to receive incoming email

Iron Contributor

I have setup in SharePoint 2019 March 2022 CU Enterprise Edition, with two minroles, WFE with Distr.Cache and App with Search.

Application Pool for Central Admin is the farm account.

 

in Central Admin, I have this setup

 

incoming-settings.png

 

I have a PowerShell script, as we are Exchange hybrid and I can't use my M365 email Outlook client to email to "SharePoint.locall"

 

I have an OU that has a Document Library that has incoming e-mail settings for the image below email.  It also accepts e-mail messages from any sender.  I even set it to EVERYONE to modify to test.

 

 

# -----------------------------------------------------------
# Function Send Email with Attachment
# -----------------------------------------------------------
Function Send_Email {

#Creating Mail Object
$Msg = new-object Net.Mail.MailMessage
$Msg.From = "Email address removed"
$Msg.Subject = "Test Email to SharePoint Library with Attachment"
$Msg.Body = "Test Email with Attachment.

Created on $($Today).

"
$Att = new-object Net.Mail.Attachment($CSVFile)
$Msg.Attachments.Add($Att)

# Send To Email
$Msg.To.Add("$($EmailToAddress)")

# BCC Email
$Msg.bcc.Add("$($BccToAddress)")

$SMTP.Send($Msg)
$Att.Dispose()
}

# Location of Attachment
$CSVFile = "E:\scripts\MLC-test.pdf"

# IP Address of SMTP Server
$SMTP = new-object Net.Mail.SMTPclient("10.93.3.99")

# Send Email To Address
$EmailToAddress = ("2019-test@sharepoint.local")

# BCC Email Address
$BccToAddress = ("Email address removed")

$Today = (Get-date).AddDays(0)

Send_Email

 

 

 

C:\inetpub\mailroot\Drop

 

03/30/2022 14:41:53.75 OWSTIMER.EXE (0x2BB4) 0x099C SharePoint Foundation E-Mail 6871 Information The Incoming E-Mail service has completed a batch. The elapsed time was 00:00:00.6718865. The service processed 1 message(s) in total. The service successfully processed 1 message(s): Message ID: <159857cc117e4503a0d9f594973294e2@NAME1-CAS12P.DOMAIN.local> 62e82ea0-7603-a029-7e2e-26979729639c
03/30/2022 14:42:53.33 OWSTIMER.EXE (0x2BB4) 0x4854 SharePoint Foundation Timer apm5x Medium Successfully started timer job {E9DDEBDE-076A-4AAA-8993-0F02A5F1FB8D} [Microsoft SharePoint Foundation Incoming E-Mail] in store for service {BAC88031-D121-4BBE-B492-4B81B7B966B6}, vserver {00000000-0000-0000-0000-000000000000}, current target 0 86347b07-a14d-43ae-a5fe-56749515b005

 

 

 

 

x-sender: Email address removed
x-receiver: 2019-test@sharepoint.local
Received: from NAME1-MAIL01P.DOMAIN.local ([10.93.3.170]) by DNS1-SPAPP01P.DOMAIN.local over TLS secured channel with Microsoft SMTPSVC(10.0.17763.1697);
Wed, 30 Mar 2022 14:41:21 -0500
X-CrossPremisesHeadersFilteredBySendConnector: NAME1-MAIL01P.DOMAIN.local
Received: from NAME1-CAS04P.DOMAIN.local (10.93.3.99) by NAME1-MAIL01P.DOMAIN.local
(10.93.3.170) with Microsoft SMTP Server (TLS) id 15.0.1497.28; Wed, 30 Mar
2022 14:41:20 -0500
Received: from DNS1-SPAPP01P (10.25.3.136) by mail.DOMAIN.com (10.93.3.99) with
Microsoft SMTP Server id 15.0.1497.28; Wed, 30 Mar 2022 14:41:19 -0500
MIME-Version: 1.0
From: <Email address removed>
To: <2019-test@sharepoint.local>
Date: Wed, 30 Mar 2022 14:41:19 -0500
Subject: Test Email to SharePoint Library with Attachment
Content-Type: multipart/mixed;
boundary="--boundary_0_d1f98efc-20bf-4cda-8787-c15edda8fc9e"
Message-ID: <159857cc117e4503a0d9f594973294e2@NAME1-CAS04P.DOMAIN.local>
Return-Path: Email address removed
X-OrganizationHeadersPreserved: NAME1-MAIL01P.DOMAIN.local
X-OriginalArrivalTime: 30 Mar 2022 19:41:21.0501 (UTC) FILETIME=[2200F8D0:01D8446E]

----boundary_0_d1f98efc-20bf-4cda-8787-c15edda8fc9e
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Test Email with Attachment.=0D=0A =0D=0A Created on 03/30/20=
22 14:41:19. =0D=0A =0D=0A =20
----boundary_0_d1f98efc-20bf-4cda-8787-c15edda8fc9e
Content-Type: application/octet-stream; name="MLC-test.pdf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment

2 Replies
Hi @Matthew Carter,
".local" is a Non-Routable domain, have you tried instead using something like ".contoso.com" ?
Thank you for being the only one to reply.
Yes, we had a 2013 environment that we used and it was local. This 2019 environment is local as well. Thank for that.

I did open a ticket with Microsoft and I found that for the web app in central administration that the user policy should have search crawling account be Full Read AND FULL CONTROL! Once that was set, it worked. That's NOT what I read and what is listed in this graphic. Yet, my search service account has read and write. not sure why, the microsoft tech wasn't either.
https://www.sharepointpals.com/wp-content/uploads/be/clip_image006_thumb_39.jpg