The way you 'scripted' your SendMail is not in compliance with VBscripting. I would suggest you review the Accellerator available in the FDM Workbench for Sending Mail to get the appropriate syntax, types and definitions.

I think you are going about your send mail in the wrong way. Please obtain some VBScripting knowledge.

If you 'double click' the accellerator it will paste the appropriate scripting where your cursor is located.
You can then modify/wrap certain pieces around your IF/Then/End If statement to achieve the results you need.

Initially I thought of using the customized script, but as per WPaffhausen advice I used the accelerator "send mail" and I am able to get on successful load a email, but unsuccessful load I am not getting a mail.

As I said previously, you should post the entire script. It is far easier to help someone when you have complete information.

As an aside, I've noticed that all of the questions you have asked have remained as unanswered. Is this really the case? Also, have you considered taking the time to flag posts as helpful? Those that take the time to try to help you really should be recognized for their efforts.