SMTP is for sending emails, IMAP is for receiving them. It is not possible to send emails using IMAP protocol.
To use SMTP protocol your application needs to have following permission in App registration on API permission screen:
Microsoft Graph/Delegated/SMTP.Send
and you need to use this scoper in your code:
"https://outlook.office.com/SMTP.Send"