Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: Interfacing Genero to a Business 365 Mail Server  (Read 11206 times)
Andrew B.
Posts: 3

« 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.
Gary C.
Posts: 109

« Reply #1 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:

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.

Andrew B.
Posts: 3

« Reply #2 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.
Gary C.
Posts: 109

« Reply #3 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:

  1. <SMTP>
  2.        <SmtpHost value="" />
  3.        <Smtp365Host value="" />
  4.        <SmtpUser value="" />
  5.        <SmtpPass value="" />
  6.        <SmtpFrom value="" />
  7.        <SmtpDebug value="0" />
  8.        <SmtpProto value="smtp" />
  9.        <SmtpTLS value="1" />
  10.        <SmtpAllowMAPI value="0" />
  11.        <DebugToFile value="0" />
  12.        <DebugLevel value="0" />
  13. </SMTP>

If you share your email address, I would be happy to discuss via Teams etc.


* tcm_eml.4gl (82.6 KB - downloaded 998 times.)
Leo S.
Four Js
Posts: 126

« Reply #4 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
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
Andrew B.
Posts: 3

« Reply #5 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 or through the forum.
Pages: [1]
  Reply  |  Print  
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines