maybe I can find help in this forum.
I have to send emails with our Progress-Application.
The emails have to be sent with outlook (no SMTP on the client--workstations allowed).
I found some examples for simple emails with attachments but I have 2 more requirements:
1. I have to use another mail-address (In Outlook, we have additional Mailboxes configured, when composing a new mail, there is an additional Field above the recipients ("Send mail as")
2. some users have request read-notification enabled. for mails out of the progress-application we would like to send the emails without notification request.
I found the Microsoft Interop API (Microsoft.Office.Interop.Outlook) but I don't get the gap between the c# examples and Progress for the outlook .net API. I'm just not experienced enough in "how to use .net with progress"
Maybe you can point me into the right direction, pointers to examples and also to the right parts in the OpenEdge Documentations are very welcome.
use the .net mail libraries
client = NEW SmtpClient(.....)
see .net docs/stackoverflow for examples to send mail to outlook
But with System.Net.Mail.SmtpClient ()- wouldn't this use SMTP?
I'm not allowed to use SMTP . I have to use Outlook!
Is it O365?, then you can use smtp (smtp.office365.com).
otherwise the old way is OLE-automation, must be in knowledge base somewhere.
Con: is only for 32-bit
An escape would be to make a visualstudio solution to call the interop and call this dll from Progress.
Personally i have a simple localhost ASP.NET website which i call from progress
Sometimes (?)it is easier to do stuff in .NET which is complicated in Progress.
BTW: db updates are more simple in Progress....
Well, you said you weren't allowed to use SMTP from the client. How about from the (App-)Server?
App-Server can be allowed.
We have an Outlook-Solution in place at the moment, with an older version of outlook, with something I think is called CDO.
All this on an old Terminalserver.
CDO dosn't work with current Outlook-Version.
My user like the "feature" that they have on copy of the emails in "Sent Items".
Thanks @tpavlovic, I will look into www.dimastr.com/.../home.htm
Sorry for not being clear in this point:
SMTP is only the protocol, so nothing is to be installed.
But our Exchange-Servers don't allow SMTP-Connections from workstation.
Also all Connections with SMTP to Servers on the Internet are blocked.
I think in reality are the SMTP-Ports blocked.
Then to do what is needed is to set up a mail server in house that will act as a "secondary" - it's sole purpose is to transport mail but not store it and only allowed to receive from inside your network. etc.
Then have the Progress application interact with that secondary which will then forward stuff up to the primary mail server. The primary will be SMTP ready because that is what the general internet uses.
If they want a "Sent Mail" then they need to open up SMTP for internal connections or hook your app into a microsoft DLL to use exchange.
Work arounds will become confusing and will get muddled up sooner or later on the next update.
Write down what you did!
Scott AugéPresidentAmduus Information Works, Inc.Technical Services for Business and Governmenthttp://www.amduus.com/cms
No mailserver with SMTP allowed in the intranet - i don't know if this is an useful security-measure, but its an worldwide company policy.
So I can't setup a secondary..
At the moment I use this code (extracted from my testprogram):
DEFINE VARIABLE objOutlook AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE objOutlookMsg AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE objOutlookAttach AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE objOutlookRecip AS COM-HANDLE NO-UNDO.
CREATE "Outlook.Application" objOutlook.
objoutlookMsg = objOutlook:CreateItem(0).
objOutlookRecip = objOutlookMsg:Recipients:Add("User@test.com").
objOutlookRecip:Type = 1.
objOutlookMsg:Subject = "TEST Progress".
objOutlookMsg:Body = "The Body".
objoutlookMsg:ReadReceiptRequested = FALSE.
objoutlookMsg:OriginatorDeliveryReportRequested = FALSE.
objoutlookMsg:SentOnBehalfOfName = "AppMAIL@company.com".
RELEASE OBJECT objOutlook.
RELEASE OBJECT objOutlookMsg.
RELEASE OBJECT objOutlookRecip.