Please explain it is possible to send the email from Flexscript custom code or any other way
Please explain it is possible to send the email from Flexscript custom code or any other way
Hi @Vinay S,
FlexSim itself does not have email features built in. Due to the extensible nature of FlexSim, you *could* create your own DLL with that functionality. But probably that is not the best use of your time when many 3rd party services or open source email servers already exist that can do the email part for you.
The easiest would be for you to use OPC-UA (as described in Jason's answer) or FlexSim's HTTP API to contact an external server that would send the email on your behalf.
Using FlexSim to send an HTTP request you could send your request to a simple web server that you host that also includes email functionality. It could be a Node.js email server, or a PHP email server, or whatever language or platform you care to set up.
Or there is a chance that your email provider has a HTTP API you can access directly. If you do an Internet search for "send email by http request <service name>" you will get resources that could help you tailor your HTTP request. So, for example "send email by http request gmail" or "send email by http request exchange", etc.
This wouldn't be something you can do in a model. The model would just send an HTTP request somewhere else.
Your real work will be at the request's target destination. You'll need to configure some server to accept the HTTP request and kick off an email. Or find some email service that will do that for you with access to an HTTP API. That is beyond the scope of this FlexSim support forum. Google and StackOverflow will be your friends in solving that problem.
As for support on the FlexSim side of things, you can find examples of using FlexSim's HTTP API in this community. Here are a few:
@Vinay S, please look for it yourself in the internet.
I tried it with “c++ send mail” and got several links in GitHub and stackoverflow.
Thank you, good idea.
Can you share a model, if you have ?
Have you considered using Node-Red to send the email after a web/socket communication from FlexSim? Or have FlexSIm write a text file or database record and detect that. If you have the emulation license you could use OPC-UA to Node-Red.
16 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved