Skip to content

Commit 4952264

Browse files
committed
update readme
1 parent 6e1d288 commit 4952264

File tree

1 file changed

+39
-38
lines changed

1 file changed

+39
-38
lines changed

README.md

Lines changed: 39 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ You will need the EWS url to connect, something like *https://owa.example.com/ew
1111
- Maven 3.6.0 or higher
1212
- Access to Microsoft Exchange Web Services
1313

14-
## Recent Updates (January 2025)
14+
## Recent Updates (2025)
1515

16-
This project has been upgraded with modern dependencies and Java 21 compatibility:
16+
This project has been upgraded with recent dependencies and Java 21 compatibility:
1717
- Migrated from javax.mail to Jakarta Mail API 2.1.1
1818
- Updated to Java 21 (from Java 8)
1919
- Upgraded all Maven plugins to latest versions
@@ -77,6 +77,43 @@ lMessage.setText("Hello World!");
7777
lTransport.sendMessage(lMessage, lMessage.getRecipients(RecipientType.TO));
7878
```
7979

80+
## Sample Application
81+
The `mailsample` module provides a working example:
82+
83+
```bash
84+
# Build the sample
85+
cd mailsample
86+
mvn clean compile
87+
88+
# Run the sample (requires EWS configuration)
89+
mvn exec:java -Dexec.mainClass="org.gartcimore.java.mailsample.MailSample"
90+
```
91+
92+
## Configuration
93+
94+
### EWS Connection Properties
95+
Create a properties file or set system properties:
96+
97+
```properties
98+
# EWS server configuration
99+
mail.ewsstore.server=https://owa.example.com/ews/exchange.asmx
100+
mail.ewsstore.username=user@example.com
101+
mail.ewsstore.password=your-password
102+
103+
# Optional: Trust all certificates (for testing only)
104+
mail.ewsstore.trustall=true
105+
```
106+
107+
### JavaMail Session Configuration
108+
```java
109+
Properties props = new Properties();
110+
props.setProperty("mail.store.protocol", "ewsstore");
111+
props.setProperty("mail.transport.protocol", "ewstransport");
112+
props.setProperty("mail.ewsstore.server", "https://owa.example.com/ews/exchange.asmx");
113+
114+
Session session = Session.getInstance(props);
115+
```
116+
80117
## Building and Testing
81118

82119
### Build Requirements
@@ -132,39 +169,3 @@ mvn dependency:analyze
132169
mvn org.owasp:dependency-check-maven:check
133170
```
134171

135-
### Sample Application
136-
The `mailsample` module provides a working example:
137-
138-
```bash
139-
# Build the sample
140-
cd mailsample
141-
mvn clean compile
142-
143-
# Run the sample (requires EWS configuration)
144-
mvn exec:java -Dexec.mainClass="org.gartcimore.java.mailsample.MailSample"
145-
```
146-
147-
## Configuration
148-
149-
### EWS Connection Properties
150-
Create a properties file or set system properties:
151-
152-
```properties
153-
# EWS server configuration
154-
mail.ewsstore.server=https://owa.example.com/ews/exchange.asmx
155-
mail.ewsstore.username=user@example.com
156-
mail.ewsstore.password=your-password
157-
158-
# Optional: Trust all certificates (for testing only)
159-
mail.ewsstore.trustall=true
160-
```
161-
162-
### JavaMail Session Configuration
163-
```java
164-
Properties props = new Properties();
165-
props.setProperty("mail.store.protocol", "ewsstore");
166-
props.setProperty("mail.transport.protocol", "ewstransport");
167-
props.setProperty("mail.ewsstore.server", "https://owa.example.com/ews/exchange.asmx");
168-
169-
Session session = Session.getInstance(props);
170-
```

0 commit comments

Comments
 (0)