When you send an e-mail, you send it via imap. First of all, you need to choose SMTP as the method to send e-mail. You must set it to SMTP when sending e-mail. Also, I do not recommend sending e-mails from the IP address where the xenforo system and server are located. You should get your mail system from a company that provides corporate mail services. Otherwise, the server and IP address on which the site is located may be marked as spam by global spam hunters and Google and other search engines.
Most hosting companies, for example Hetzner, close the mail route. Because threads are contaminated with spam. For example, I work with Hetzner and their e-mail ports are closed.