Thanks Ray, That has solved part of the problem in that it appears to send and redirects to the correct page. However nothing is being received at the other end. I specifically created an email account to use as the username and password for this and tested by setting it up in Thunderbird so I know the sending from this email does work. I have checked and double checked all the settings and tried using different ports but nothing is received at the other end.