2
Logging the subject in the delivery log
Question asked by Andrew Hiltz - 9/21/2021 at 11:31 AM
Answered
Hello,
I am attempting to develop a service that will handle the sending of emails for our other applications.  Any email that is to be sent will be recorded in one of our dBs and then the service will connect to Smartermail to send the email.  At this point SM always returns a successful send to my service, but it was only successful in putting it into the spool to actually be sent out to the internet.  We need to scan Smatermails delivery log to see if the email was sent, bounced or what.  Is there a way to enable logging of the email subject in the delivery log?  At this point I can see when the email was sent, who it's from and to, but the subject nor the body are not referenced making it impossible to match the email delivery to the record in the dB.

Looking at this from another angle, is there a way to make a request to the SM user account I am using for the send to see if the email was sent or bounced?

3 Replies

Reply to Thread
1
Tony Scholz Replied
Employee Post Marked As Answer
Hello Andrew, 

Currently, there is no way to have the subject add to the delivery logs. 

One option would be to add a spool script. 



Command Line File - Move the slider to the right to enable this option. Then enter the full path to an executable you wish to use to process incoming messages. Use %filepath as an argument to pass the path of the email file to the executable. It is allowable for the executable to delete the message to prevent delivery. Example: If you set this field to "c:\program files\myexe.exe %filepath", the program myexe.exe will be launched with the full path to the spool file as its first argument.

Command-Line Timeout (Seconds) - The number of seconds that the server will wait for information from the remote server. By default, the timeout is set to 5 seconds.

The way this works is that the .eml path is passed to the script you write up. What you can then do is to read the file and record the EML number and the Subject to compare in the logs. The last 8 digits of the EML number are the session number as well. 

I hope this helps. 

Thank you
Tony Scholz System/Network Administrator SmarterTools Inc. www.smartertools.com
0
Andrew Hiltz Replied
Thanks for the reply.  I will have to play around with this and see if I can get it working
1
Andrew Hiltz Replied
I was able to write a Windows Console app and am able to get the info as you indicated.  Thank you for your help

Reply to Thread