Mike,
Thanks for the more detailed response. I am still not sure whether I am more confused now than when I started. Yes I understand that CDO is a lower level function but it must still talk to something to find out which SMTP server to use, what is the user name, what is the password etc. I assume if Outlook is present it gets it from there but if not it gets it from somewhere else or am I oversimplifying things? I haven't told it where to look!
I had already visited FAQ184-1768, possibly as a result of finding one of your previous postings on the subject and this is where I got my first test code from and thought this was going to be so simple. Thanks for that.
This time, however, in revisiting that area, I also spotted the link to FAQ184-1769 for use with mail servers such as Exchange which you have also linked above. I had not realised that the first set of code would not work if Exchange Server is being used (or have I got that wrong?). I do not have Exchange Server installed here but I thought I would give the code a try anyway. On sending a simple email, it came up with the normal security dialogue but there was an extra bit which said ' and allow access for ' and you could select a time interval up to 10 minutes. This seemed an ideal solution, if only it had also been put into standard outlook automation! When it tried to send, however, it then also came up with the standard outlook security dialogue where the 'yes' and 'no' buttons do not light up for several seconds. Maybe that's just a red herring though and in a true Exchange Server environment users are much better offer already than I had realised.
In a true Outlook Exchange environment, my understanding now is that if I send email as in FAQ184-1769 then you will get the security message only once regardless of the number of emails being sent and can tell the system to continue to allow access for a further length of time without further security messages. Have I understood this correctly?
In your example code there, you resolve the name from the address book rather than simply pass a 'to' address. I tried
onewmessage.to = "me@mydomain.com"
however, it did not like the property. What is the correct syntax for this.
Thanks for your help on this. Sorry to ask so many questions on it, however, I am sure there must be a lot of other people out there thinking the same things who should also benefit.
Paul Herschell