MxSMTPServer on Mendix cloud

1
In our system we like to process received emails immediate in the Mendix app. The emails will be send to a specified email address. It should work like the support desk of Mendix is using with their ticket system. Reply on ticket by email and the ticket is inserted automatically into the ticket system. I found the MxSMTPServer App from the AppStore. This is possible on my local development PC. But is it also possible to run the MxSMTPServer on the Mendix cloud portal. I tried but could not reach it. I get the following error message: could not open connection to the host. Is the port 25000 closed? Should I use another port? Should Mendix open this port? Should I use another app from the AppStore, where I can receive emails and process them in my application?
asked
3 answers
1

@Michel, thanks for the answer and information You are sure, the smtp server was not what I needed, but I needed someting to read an imap/pop3 account.

I found the solution, by modifying the MxSMTP app, to a retrieve from IMAP/POP3 account. I used the MxSMTP as basic, because the advantage of the current MxSMTP app, was that there were a few steps within the process, where you can check how to proceed with the received email.

The only thing I have to do is to test it in a cloud slot if I can retrieve email from a POP3 account.

answered
0

You can't currently do that, due to security constraints (on a number of levels, by the way). What we advise you to do is set up/use an existing smtp/imap server that you poll on a regular basis (ie scheduled event).

answered
0

@Jacco, make sure you first know whether you want to use IMAP or SMTP, because from an infrastructure point of view those are completely different. Receiving messages from IMAP in a cloud should be feasible (the Mendix app could act as mailclient), but using the Mendix app as SMTP server (for which the MxSMTP module is intended) is quite another story and is only needed when you want to submit email to and from random email addresses (as done in home.mendix.com and support.mendix.com).

The far more easy solution is that your sysadmin sets up an email box for you, and you wrap some java IMAP library in Mendix and just receive email from that mailbox. This has probably done before, but AFAIK there is no appstore module available.

Probably the Apache Commons libraries included by Mendix can already do the job, or just use the javax.mail api directly. See http://commons.apache.org/net/ or http://commons.apache.org/net/examples/mail/IMAPMail.java or http://stackoverflow.com/questions/12131166/read-localhost-pop3-inbox-with-javax-mail

answered