Cor and Patrice,
I was delinquent in providing full detail. I am running XP-Home and
no IIS. I have provided no username, password or SMTP server
identification (i.e. smtp.comcast.com). Simply state Smtp.Send(my
address, to addresses, subject and message) in the Form load and after
a timer delay to be sure it sends, Application.Exit, and it is working
great. I'll run the exe from a scheduler each week
I concur with the others: I'd like to see that code.
These two lines in VB.Net:
Dim sx As New SmtpClient
sx.Send("(e-mail address removed)", "(e-mail address removed)", "Test", "Test")
cause an exception
"The SMTP host was not specified."
My idea of what that means is that you (or someone) must have specified a
mailserver somewhere, or you'd have run into the same exception.
That doesn't necessary have to be in your code: the SMTP server can also be
specified in the .Net application or machine configuration file.
But now I'm beginning to wonder: it isn't done often AFAIK, but the SMTP
server can also be passed as a DHCP option (option 069) when your PC
receives its IP address. What I don't know is if Windows/.Net CLR would
use it as default if your network admin had set it up that way.
As for username and password, that's another matter: you normally don't
need those to send mail, only to retrieve mail from a POP account.
SMTP is in essence an authenticationless protocol, it will accept mail from
anybody (which is why there's so much spam going around, which in turn is
the reason why they started building in restrictions, but that story is too
long for this message).
This version works (here, for me, if I replace the addresses by real ones):
Dim sx As New SmtpClient
sx.Host = "10.1.0.5"
sx.Send("(e-mail address removed)", "(e-mail address removed)", "Test", "Test")