I searched and have tried exactly what is suggested, even tried to use the code. I also was able to register the dll successfuly. Session and GetDatabase were executed with no problem, but the OPENMAIL command failed with error message. Can’t seem to figure out the problem. Do you think applying the patches will fix the problem as the lotus version that I am working on is 6.0.