Your question is pretty vague.
Each configured email address in osTicket has a SMTP and POP/IMAP server that you can configure. Both must use the same account credentials if you are required to use authentication.
You can always add additional email addresses.
You would have to contact your host (nextcloud) to get the specifics to using their mail servers.