Answered Sending email from progress

Hello everyone,
New question for the day :)
For sending email we have to ways:
1. Is our homemade solution based on the mailsend project
2. Is pur smtp mail by our ERP provider (I don't have the source code).
But this two solutions are lacking in authentication. So some of our customer and vendors are not receiving our email from our ERP because of that.
I was looking for a solution to connect the user to the office 365 server to be authenticated but it seems to be hard as I don't want them to keyed their credentials.
Did you faced this issue? How did you managed to do it?
There is also the issue of batch email ?

Thanks in advance and best regards,
 

Cecil

19+ years progress programming and still learning.
Regarding the the Office 365, I have managed to write some Proof of Concept code witch authenticate against MS Graph OAuth requesting the user to authenticate once and produce a refresh token and access token.

Then using the Message API I can draft an email and send it, even include attachments.
The best part is that the email shows up the sent items of in Outlook.

It's using the OpenEdge.Http.Client to interface to Graph API and the MS Graph documentation is a bit weak in some parts.
I would agree that it is a lot of work writing a reusable ABL class object. But is does open up other possibilities like Contacts, Calendar, Tasks, Notes and even OneDrive.
 
The authentication is still the main issue. What bother me the most is that when you are logged in windows and you launch a web explorer to connect to a windows web app like outlook, the SSO is available. But I can't seem to find a documentation about it.
I will keep what you write in mind.
one the issue on this solution is also that when microsoft is making updates we have to maintain it.
 

Cecil

19+ years progress programming and still learning.
This is what the refresh token is used for. To be able to get a new access token without prompting to authenticate.
 

ChristianBryan

New Member
Example GRAPHAPI controller to send email
Uses .NET classes to do the POST.
You will need to create an App Registration in AZURE and generate a clientID and Secret.
The code reads these in from an include loadibsini.si but just replace that bit with whatever means you use to store config data in your application/framework.

Check out attached
 

Attachments

  • SendEmailGraphHandler.txt
    15.3 KB · Views: 9
  • test_SendEmailGraphHandler.txt
    1.2 KB · Views: 7

Cecil

19+ years progress programming and still learning.
Example GRAPHAPI controller to send email
Uses .NET classes to do the POST.
You will need to create an App Registration in AZURE and generate a clientID and Secret.
The code reads these in from an include loadibsini.si but just replace that bit with whatever means you use to store config data in your application/framework.

Check out attached

Hummm. This is interesting. OE 12.8 will support .NET v6 on Linux (excluding WinForms). So, in theory this code might work on Linux.
 
I would try this.
For now we used a signing soft (DKIM) and it seems to work for our sendmail workflow.
But I will keep in mind your proposal .
 
Top