|You don't have to log in to an SMTP server to send mail to it. That would require every mail server in the world to have accounts on every other mail server. But it is true that if you wish to use a fixed SMTP server as your relay for all outgoing mail then you may need an account on it.|
To send directly to an SMTP server you need to determine the IP address of the mail server for the domain that you are sending to, which is not a difficult task. Using a relay avoids this, which is what most mail clients do. It's perfectly possible to use the SmtpClient class to connect directly to the target server, but easier to use the same SMTP server as your mail client would. Authentication information can be supplied by the SmtpClient class. All you are doing is writing a very simple, outbound only, mail client. The link I gave provides a simple example that you can elaborate.