Is there any way to automate the sending of the shipment notification email?
I am using ShipRush for SQL (UPS and USPS versions) which writes the tracking number and ShippedVia fields back to the order table for the order. Is there any way to automate the sending of the email to the customer without requiring someone to pull up the order on the admin site and clicking the "mark as shipped" button? I can write a server application that runs on a schedule or something like that if needed. Is it possible to use the assemblies in the bin folder and to just call the code that is behind the button? Will this work in my own application? Is there any setup required to initialize the assemblies to work in this way? It seems a risky way to do it.
Well I was able to come up with a workable solution. Instead of trying to use the existing code I just created a CLR stored procedure in Visual Studio that uses system.net.mail and the SmtpClient class to send the email myself. Visual Studio deployed the CLR procedure to my database for me and then I wrote an UPDATE trigger on the Orders table to call the stored procedure whenever the ShippingTrackingNumber field is updated with a value and the ShippedOn field is null. The trigger sends the email and then updates the ShippedOn field to GetDate() - works great!