Troubleshooting a app

I recently ran into a problem with a system that was missing pieces of mail. The developers who owned the system had been downsized due to economy and the business users only knew what the end outcome should be. Developers owning systems being downsized and leaving no technical resources is not an uncommon problem where I work. I am not proficient in asp but it falls in my job role to resolve problems of all forms. After having the business owner walk me through what the asp app end goal was I was able to determine which application it was using. The issue was email was not being sent for certain domains. The logic was straight forward an asp program had an include file was which pointed to a function to send email using a Aspmail 4.x by “”. This mail logic looked straight forward and I assumed debugging would be a snap. The only way to run this application seemed to be in a production mode. Since I did not have access to the mail logs of the mail server this service sent to I switched the smtp server to a server I did have access to. This is an easy change in “RemoteHost” configuration of the Aspmail object and had little risk. I took a back up modify the file and proceed to test. To my surprise the mail to the domain that did work still came from the old smtp and the mail that did not work still did not work. This baffled me for awhile since switching the smtp server should have been instant. I looked everywhere to figure out why it had not been routed through my mail server as expected. Finally to my surprise I found an if statement above the send, “if (false)”. What’s this “if (false)”? A little research but me to the understanding that this “if (false)” meant a developer had commented out the whole section of code. Now I was really stuck since now I did not know how the email that was getting sent was sent. I searched all the code and found an insert into a database with the email content and destination. Now I just needed to find a job sending this content. I looked through all the source code and was also surprised to find that the windows search feature “in files” had not even found my reference to the email table. Here I found there is an issue with the windows search feature that does not search all file types. I found a bug note but could not apply the fix do to the instance being production. I copied the source code to another machine and ran ultra edit search on it. There I found a single reference to the code the insert. I finally got the admin of the mail server the mail was coming from to send me his mail logs. I found the log line which should the mail coming from a different box. I found this box had a java program running every ten minutes sending the email, I reconfigured this java app to point to my smtp server. Reran the test to both the email account failing and the one succeeding and monitored the logs, there I found what I expected and access denied from the mail server receiving this mail.