### Example Placeholders for Keywords
Source: https://github.com/m66b/fairemail/blob/master/FAQ.md
This example shows placeholders that can be used within keywords since version 1.2132.
```Fairemail
$day$
```
```Fairemail
$week$
```
```Fairemail
$month$
```
```Fairemail
$year$
```
--------------------------------
### Install FairEmail on Windows via ADB
Source: https://github.com/m66b/fairemail/blob/master/FAQ.md
This snippet shows how to install the FairEmail APK on Windows using the Android Debug Bridge (ADB). Ensure you have platform tools installed and developer mode enabled on WSA.
```bash
cd /path/to/platform-tools
adb connect 127.0.0.1:58526
adb install /path/to/FairEmail-xxx.apk
```
--------------------------------
### Example Placeholder for Move Action Subfolders
Source: https://github.com/m66b/fairemail/blob/master/FAQ.md
This example demonstrates using placeholders like $day$, $week$, $month$, $year$, $user$, $domain$, and $extra$ to create dynamic subfolder names for move actions.
```Fairemail
$day$
```
```Fairemail
$week$
```
```Fairemail
$month$
```
```Fairemail
$year$
```
```Fairemail
$user$
```
```Fairemail
$domain$
```
```Fairemail
$extra$
```
```Fairemail
$user:to$
```
```Fairemail
$extra:to$
```
```Fairemail
$domain:to$
```
```Fairemail
$group$
```
--------------------------------
### Example Jsoup Selector for Local Notes
Source: https://github.com/m66b/fairemail/blob/master/FAQ.md
This example shows how to use a Jsoup selector to extract text from HTML elements for use as local notes.
```Fairemail
jsoup:td > span:containsOwn(€)
```
--------------------------------
### Email Provider Configuration Example
Source: https://github.com/m66b/fairemail/blob/master/index.html
This XML snippet shows how to configure an email provider, including IMAP and SMTP server details. It is used when adding a new provider to FairEmail.
```xml
// this is not needed
```
--------------------------------
### Configure alternative URI for fetching favicons
Source: https://github.com/m66b/fairemail/blob/master/FAQ.md
This snippet shows example URIs for fetching favicons. These can be configured in the debug options for alternative favicon fetching services.
```text
https://icons.duckduckgo.com/ip3/{domain}.ico
https://www.google.com/s2/favicons?sz=128&domain={domain}
https://favicon.yandex.net/favicon/{domain}
```
--------------------------------
### Example Received Header for TLS Transport
Source: https://github.com/m66b/fairemail/blob/master/index.html
This example shows a 'Received' header that indicates a message was transported securely using TLS. It includes details about the mail server, the transport protocol, and the TLS version used.
```text
Received: brown.elm.relay.mailchannels.net (brown.elm.relay.mailchannels.net. [23.83.212.23])
by mx.google.com with ESMTPS id d10si6675855pgb.5.2021.12.24.13.20.38
for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
```
--------------------------------
### Example of a securely transported message header
Source: https://github.com/m66b/fairemail/blob/master/FAQ.md
This example shows a 'Received' header that indicates secure transport using TLS. It is used to verify if a message was transported securely by all servers when the 'Check transport layer security (TLS)' option is enabled.
```text
Received: brown.elm.relay.mailchannels.net (brown.elm.relay.mailchannels.net. [23.83.212.23])
by mx.google.com with ESMTPS id d10si6675855pgb.5.2021.12.24.13.20.38
for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
```
--------------------------------
### Email Provider Configuration Example
Source: https://github.com/m66b/fairemail/blob/master/FAQ.md
This XML snippet shows the structure for defining an email provider's connection settings, including IMAP and SMTP hosts and ports. Use this as a template when adding new providers.
```xml
// this is not needed
```
--------------------------------
### Expression Condition: AND
Source: https://github.com/m66b/fairemail/blob/master/FAQ.md
Example of an expression condition using the '&&' (AND) operator to combine multiple criteria.
```plaintext
from contains "@example.com" && subject contains "Example"
```
--------------------------------
### Using IMAP CONDSTORE and QRESYNC for Folder Resynchronization
Source: https://github.com/m66b/fairemail/blob/master/app/src/main/java/com/sun/mail/imap/package.html
Demonstrates how to use the IMAPFolder open method with ResyncData to enable CONDSTORE and QRESYNC extensions for synchronizing mail folders after offline operations. It shows how to process MailEvent instances, including MessageChangedEvent and MessageVanishedEvent.
```Java
Folder folder = store.getFolder("whatever");
IMAPFolder ifolder = (IMAPFolder)folder;
List events = ifolder.open(Folder.READ_WRITE,
new ResyncData(prevUidValidity, prevModSeq));
for (MailEvent ev : events) {
if (ev instanceOf MessageChangedEvent) {
// process flag changes
} else if (ev instanceof MessageVanishedEvent) {
// process messages that were removed
}
}
```
--------------------------------
### Example Date Condition
Source: https://github.com/m66b/fairemail/blob/master/FAQ.md
This condition checks if the received date plus 7 days is before the current date and time.
```Fairemail
(received + 7*24*60*60*1000) < DT_DATE_TO_EPOCH(DT_NOW())
```