Question

I have SMTP installed on my SharePoint server per the instructions on Technet, using the "basic scenario". I also made sure the relay and connection controls included both IP's for the server and 127.0.0.1. The primary IP for the smtp server is a public IP shared by a web application exposed to the internet. When submitting an infopath webform to this smtp server (for the purpose of submitting to a document library), the email comes to me (I am CC'd, different email domain, etc) but not to the document library. The email settings for the form use the IP address because there's no specific external domain name for this mail server (ie: wwwemaillib@xxx.xxx.xxx.xxx).

I have checked the event viewer and there are messages saying the document library checked its inbox and imported 0 emails.

There are other messages saying:

Warning:  Message delivery to the remote domain 'xxx.xxx.xxx.xxx' failed for the following reason: Unable to deliver the message because the destination address was misconfigured as a mail loop

I have tried different means of changing the smtp settings but I have to admit I'm not really an email setup guy. A lot of the things I do break the form so it cannot send emails at all, so I basically keep coming back to this, where I can get an email in my inbox but the library does not get it and the above error appears.

Essentially, the situation is this: SharePoint is sending to the SMTP server, which is on the same machine. It is sending to itself. Is that an acceptable/feasible situation with a public site? If so, what do I need to do to make it work?

UPDATE

So, I renounced some of the settings I made earlier and it is exactly like the configuration on Raymond Macaalay's Dev Blog. Now, I no longer get the email to my personal inbox, but the stuff does show up in the drop folder for the SMTP server. I did not see any error messages so I changed the config in Central Admin to Advanced and set it up to try and pull from the drop folder directly. New error message:

The Incoming E-Mail service has completed a batch.  The elapsed time was 00:00:00.0312002.  The service processed 2 message(s) in total.

Errors occurred processing 2 message(s):
Message ID: <DEVSP2010suljUFZnKl00000001@DEVSP2010.mir.local>
Message ID: <DEVSP2010FRaqbC8wSA00000002@DEVSP2010.mir.local>

Which of course is super useful. I looked in the ULS logs and didn't really see anything in there either.

UPDATE 2

I used powershell to send a simple plain-text email to the library in question (previously sending InfoPath forms as attachments), and these emails send just fine. So, I guess the real problem is the type of email I'm sending it. Either the InfoPath content in the body of the email message or the InfoPath attachment are causing problems for SharePoint. The form is a content type that is published to the library via central administration, so it should be an acceptable document for that library.

Was it helpful?

Solution

I found out the answer to the question of "Why isn't this working?" as well as "how to make it work":

  1. It's not working because SharePoint adds a header to the email message called X-Mailer: SharePoint Foundation 2010, and the incoming email feature will not accept emails with that header. This is apparently by design.
  2. To make it work I will have to write some custom code to either take the X-Mailer header out of the email messages while they're waiting in the drop folder, OR add it to the InfoPath form's code-behind to use a System.Net.Mail method to send the form data instead of the standard email submit option.
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top