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: firstname.lastname@example.org).
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?
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.
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.