Email Config Question

0
I am trying to get my send email feature to work correctly. It works fine if I send from my account (with my credentials) however it does not work for anyone else. This makes sense as it is using my credentials.  I have a question on the best way to manage credentials (using Outlook 365). Should I store the login & password data within my Mendix app or am I better off creating a Email Address specifically for Mendix and grand permission to everyone so they can send?  
asked
2 answers
0

General practice is. you must have a specific email account setup for your app. like noreply or support or something.

Then configure your Email settings with proper email, password and other configurations.

With Mendix security and roles, you will be able to restricts others to see the email configuration if needed. 

Then use the configured settings to send email.

answered
0

Martin,

That depends what you want your app to do.  We have apps where the company uses Office365 and wants emails sent from the app to be from the person logged in to the app.  In this case, you can’t use a single set of credentials, but will need to store credentials (of some type, more on that later) for each Mendix user that will need to send email.

For testing purposes only, you could store Office365 Username and Password on the Mendix entity where user account information is stored.  However, this is a security no-no, so you should not move into production this way.  Your options are to implement OAuth integration between your Mendix App and Office 365 or use Microsoft Graph integration.  Graph Integration is the most up to date way to do this.  In this case, you will send emails using the Graph API, so its a bit more work than using the Email Templates module.  

If you don’t need to have emails come from specifc people, you can use a single address as Nirmalkumar described.

Hope that information is helpful,

Mike

answered