The ExchangeConnector28 is developed by Marco Kuipers of 28 IT Pty Ltd and is provided 'As is'.
It contains a test project, view and the .net dll that connects to your Exchange server or Office 365 exchange.
As this is a .net DLL you use regasm instead of regsvr32.
The version of .net runtime you have on your machine might be slightly different, so the directory would be different (just use the highest version number).Should respond with
Microsoft (R) .NET Framework Assembly Registration Utility 4.0.30319.1
Copyright (C) Microsoft Corporation 1998-2004. All rights reserved.
Types registered successfully
Type in your username and password.
Leave the Exchange Server Endpoint for office 365, or change it to your exchange domain like https://mail.mydomain.com/EWS/Exchange.asmx.
Alternatively use the Discover function with the prompt button.
(F5 in the fields places back the Office 365 endpoint)
Type in the recipient, the subject and the body and sent the email.
In this demo version it will add the following to the email body.
GRANT OF LICENSE TO USE.
This agreement grants you the following rights. * DEMO VERSION You may install and use an unlimited number of copies of the product
on an unlimited number of machines.
The demo version expressly prohibits you from using the product for any purpose other than evaluation of the functionality of the
product. You may not use the demo version to develop completed applications.
I suggest you have a look at the ExchangeEmailTester.vw and make your changes to suit your needs.
The package uses Structs and byref, meaning it needs DataFlex 11 or up. However for older DataFlex versions like VDF 7 or DF3.2 you can use the command line ExchCon28.exe for email sending.
The struct passed to the DLL with the function
SendEmail
is of the format:
Struct tExchangeConnectorEmail
String username
String password
String serviceEndpoint
String replyTo
String[] recipients
String[] recipientsCC
String[] recipientsBCC
String subject
String body
String[] attachmentFiles
End_Struct
Again I suggest you have a look at the ExchangeEmailTester.vw and make your changes to suit your needs. The Meeting request is a tab page in the same view.
The struct passed to the DLL with the Function
CreateMeetingRequest
is of the format:
Struct tExchangeConnectorMeeting
String username
String password
String serviceEndpoint
String[] requiredAttendees
String[] optionalAttendees
String subject
String location
Integer startYear
Integer startMonth
Integer startDay
Integer startHour
Integer startMinute
Integer endYear
Integer endMonth
Integer endDay
Integer endHour
Integer endMinute
String body
String[] attachmentFiles
Integer isAllDayEvent
End_Struct
The command line interface is provided to support VDF7 and DF3.2 projects. It is using the DLL so it will still need to be registered as per above section 1.2.
When run without arguments the following help is shown
Calls ExchangeConnector28 with arguments and text file with email content. ExchConn28 /U:Username /P:Password /S:SrvcEP /E:EmailFile /O:OutputFileStatus /U Username; leave blank when using domain user to on-premise Exchange /P Password; leave blank when using domain user to on-premise Exchange /S ServiceEndpoint; e.g. Office 365 'https://outlook.office365.com/EWS/Exchange.asmx' e.g. on-Premise 'https://computername.domain.contoso.com/EWS/Exchange.asmx' /E Filename of email text file. The text file can contain: ReplyTo: Johnny@abc.com To: Jo@abc.com To: Mo@abc.com CC: BCC: Subject: This is a very cool email that I wanted you to see Attachment: c: empttachment1.jpg Attachment: c: empttachment2.jpg Body: This is the email text. It is just html. And the text can continue for many lines, as the body is the last tag. You can bold etc. /O Filename of output text file, the status will be saved here.
ReplyTo: Johnny@abc.com To: Jo@abc.com To: Mo@abc.com CC: BCC: Subject: This is a very cool email that I wanted you to see Attachment: c:\temp\attachment1.jpg Attachment: c:\temp\attachment2.jpg Body: This is the email text. It is just html and should be rendered into the string. But continue reading and adding to the Body variable until the end of file is reached. Further to the above, the CC: can be left blank or can be left out all together. When blank leave the struct member null
ReplyTo: Johnny@abc.com To: Jo@abc.com CC: John1@abc.com CC: John2@abc.com CC: John3@abc.com Subject: This is a very cool email that I wanted you to see Body: Hi
This is a cool email from me.
To: Jo@abc.com Subject: This is about the minimum that an email would look like I'd think. Body: Hi
This is an email with a unicode smiley 😀.
If you have any questions or suggestions email me on Marco@28IT.com.au or post in the forum DataAccess Forum Post
If you would like to use this in your project, please contact me to purchase a version of the DLL without the demo text.