This project is read-only.

Orchard Email Service & Windows Azure

Topics: Administration, Core, Troubleshooting
Sep 14, 2013 at 3:27 AM
Edited Sep 14, 2013 at 3:29 AM
Hi All,

I've written a custom module which has a requirement to send emails when an application is submitted. I've looked at how Orchard.Users module implemented IMessageEventHandler interface in UserMessagesAlteration. I followed the same pattern and created my custom messages in the custom module. Both Users module and custom module use the same EmaiMessagingChannel defined in Orchard.Email module. I confirmed that by putting breakpoint in SendMessage() method.

Everything worked great on my laptop and the custom module sent out emails just fine. I put this code on production hosted as Azure website and then emails did not go out when application was submitted. I thought probably it's Azure thing but then I tested Forgot Password and that emails was sent. So it's not a Azure thing. I can't figure out how Users module can send messages, but the custom module can't.

Any messages logged in App_Data\Logs folders are not pertaining to this problem. The Email module uses NullLogger.Instance, so that's not very helpful.

Does anyone have any idea why one set of emails can go out and one set doesn't on Production server, but exact same code works fine on dev server?

How do I go about trouble shooting this issue? Can any recommend how they implemented emails from custom Orchard module? I appreciate any help.