Hi Imar,
Sorry for the delay in responding and after a long frustrating morning I can finally give you my findings. Hopefully this may help someone else in the future.
If anyone has had this error then please read my whole experience - it could be useful?
1) After your comment that my own machine name could be causing the problem by having underscores in it (being "Ian_VW_VAIO"), I changed my machine name to remove the underscores ending in ("IanVWVaio" ). This did indeed did solve the error and I no longer got "Syntax error in parameters or arguments. The server response was: Syntactically invalid EHLO argument(s)" when running the send email code from the book.
2) That said, everything looked fine, I got no errors from the webpage and Message Sent was displayed as expected (i.e.
VB code executed successfully). Unfortunately, no email arrived in the inbox of the recipient of the email? Confusing?
3) After investigation with 123-reg.co.uk who is my service provider I gained the knowledge that they did not support what they called "Scripting from Contact Forms" as per, what I am assuming you have in the book, but they did offer an ASP scripting example which did work with them? After trying their own scripting code it was a total red herring and I got nothing but "Error: The transport failed to connect to the server. (-2147220973)"
4) After this, I got fed up with the 123-reg smtp host and decided that I needed another smtp solution to work with the site. I therefore created a new pop3 email account with GMail, knowing that my previous goolemail account worked fine with the components in the book. After the account was setup I configured MS Outlook to send and receive emails from the gmail account to verify validity. This worked fine so I knew the account was setup correctly. Amongst the usual settings the smtp port used for the outgoing mail was configured as 465. I transferred all this information back to the Web.config file in the website and clicked the send button. After a few seconds I then got "Internet Explorer Cannot Display the Webpage", i.e. the page timed out.
5) After investigating "ASP.NET Contact Forms with Gmail" on the net I came across a site with a similar coding example for sending email using GMail with ASP. The only major difference in their coding was the port they were using to connect to which was 587.
6) Bingo! everything works, but what a headache!
In summary,
If you have underscores in your own computer name then remove them. Note that not all email providers generate the syntax error as discussed in this thread since googlemail works fine with underscores in your computer name?
If you use 123-reg.co.uk to host your email then use a different email provider to send your email from your site. As at this point 123-reg.co.uk simply does not allow you to script to their SMTP server.
If you use GMail to host your email address then do not use the standard SMPT port of 465 to send messages form your site. You must use port 587.
Thanks once again Imar for putting me on the right track. Its been a headache but we got there in the end.
Time to get back to studying the book again so talk to you again soon.
Kindest regards,
Ian