You might want to check out this: https://docs.mendix.com/howto/extensibility/install-and-configure-the-smtp-module#1-introduction
and this: https://docs.mendix.com/developerportal/deploy/sending-email#1-introduction