The example of this class calls class method statically which further lands on the fatal error for using $this inside Connect method. The $param for SMTP connection details are not taken by connect method, too. I needed to make a lot of changes in Class code as well as needed to write a complete new test script. Author should take these things into account and he is humbly requested to repost the script that works fine with example provided with script. Not criticizing his Author's effort; just thing that I didn't work for me and in the event when I wanted it most. Sorry!