Title: Interfacing Genero to a Business 365 Mail Server Post by: Andrew B. on April 11, 2022, 12:03:38 pm Does anyone have experiencing interfacing Genero to a 365 Mail server?
Our application runs on Oracle Unix servers and need to be able to send emails out directly from the Unix server without going through the user default PC mail application. This is used to send automated emails. Our application can send out through other email servers by using a combination of MIME Lite and perl scripts, but the 365 server has additional security protocols which prevent this. Any pointers / help would be greatly appreciated. Title: Re: Interfacing Genero to a Business 365 Mail Server Post by: Gary C. on April 11, 2022, 01:58:51 pm Hi Andrew
Yes, we have done that. Our application runs on Linux and allows for automated or user generated emails to be relayed through Exchange 365 online. We only use Genero, no scripts etc., and make use of the JAVA mail libraries to manage the SMTP communication and set up a connector in our 365 Exchange environment that only allowed inbound connections from our public IP address: https://docs.microsoft.com/en-us/exchange/mail-flow-best-practices/how-to-set-up-a-multifunction-device-or-application-to-send-email-using-microsoft-365-or-office-365#option-3-configure-a-connector-to-send-mail-using-microsoft-365-or-office-365-smtp-relay This works really well for us - we send about 40,000 emails a month using it. I'm happy to give any further detail I can if you wish. Gary Title: Re: Interfacing Genero to a Business 365 Mail Server Post by: Andrew B. on April 11, 2022, 02:48:47 pm Thanks Garry, that's really useful. I'm aware of the Microsoft documentation but it way the sending with the TLS security etc that is our problem.
I hadn't come across the Java Mail libraries before. Are these open source? It certainly sorts something we would be interested in using especially if it gets rid of using other 3rd party scripting. Any info or examples on this would be greatly appreciated. Title: Re: Interfacing Genero to a Business 365 Mail Server Post by: Gary C. on April 12, 2022, 10:30:22 am Hi Andrew, yes the java libraries are open source. We do use some paid for libraries but from what you have described, that would not be required.
I've attached our core mail library code for you. There is also an XML file which holds basic config details, for example: Code
If you share your email address, I would be happy to discuss via Teams etc. Gary Title: Re: Interfacing Genero to a Business 365 Mail Server Post by: Leo S. on April 12, 2022, 01:56:22 pm Hi Andrew, we do use the javax mail libraries as well in-house to send test results with a simple command line tool.
I extracted the tool and made it available at https://github.com/FourjsGenero/tool_fgljmail The tricky part is setting the CLASSPATH correctly (look into the Makefile) and knowing that activation.jar is needed to get access to javax.mail.internet.MimeMessage. May be that helps too to get a kick start. @Gary interesting power usage of Java:-) Regards, Leo Title: Re: Interfacing Genero to a Business 365 Mail Server Post by: Andrew B. on April 12, 2022, 04:11:01 pm Many thanks Gary and Leo, this is really useful.
I've downloaded the latest JDK, javax.mail and activation.jar. I've been able to compile some of the mailing examples that come with javax which is a start. I'll also download the fgljmail examples from Leo and have a play. Please feel free to contact me at andrew.bee@swanretail.co.uk or through the forum. |