Hello Lazy Bee,
Thank you for reaching out to Microsoft!!
Regarding the query mentioned, is it possible to connect to an external SMTP server with SharePoint 2016 on-premises using Microsoft Graph API, Unfortunately Microsoft Graph API does not support SharePoint on-premises functionalities. Hence it is not possible at this moment to connect to an external SMTP server with SharePoint 2016. Apologies for the inconvenience caused.
Please find the below links for reference:
configure-the-secure-store-service
Also, please find the related post here:
Hope this helps.
If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.