What is the difference between smtp server and smtp protocol? Can I also use smtp protocol to send email to non smtp server?

Hosted on an SMTP server, SMTP is used to send, relay or forward messages from a mail client, but cannot receive messages. On the other hand, IMAP is an e-mail protocol that deals with managing and retrieving e-mail messages. IMAP keeps an email on a server, and then synchronizes it across several devices.

What is the difference between smtp server and smtp protocol? Can I also use smtp protocol to send email to non smtp server?

The SMTP server is a computer that is capable of serving content through SMTP protocol.

The protocol itself is the way of communication, specialized for funtionality related to e-mail standards.

For sending automated e-mails, you definitely want to set up your SMTP server, but your target would be an e-mail address.

But in order for you to achieve, you need a solid understanding of the underlying theories, so I recommend reading up in the matter at least on Wikipedia.

A mail server is the generic term for incoming and outgoing email i.e. email being sent to you and also email you are sending to other people. SMTP Server refers to just the later i.e. is used for sending mail out to people.