When using SPUtility.SendEmail() to send an e-mail message from within a site on which anonymous access is enabled, you have to specify the from address.
The code in the fragment below is executed in the SendEmail method and explains why:
email = messageHeaders["from"]; if (email == null){ email = web.CurrentUser.Email;}else{ email = FoldEmailHeader(email, "from", true); count--;}
The code listed above is being executed in the SendEmail method (obtained by using Reflector). As you can see, if the “from” address is not in the StringDictionary “messageHeaders”, the from address is being retrieved from web.CurrentUser. Since anonymous access is being used, this will obviously fail.
