v0.11: Angebot wartet sichtbar auf Pflichtangaben; Postfach prüfen; Eingangsmails am Vorgang
Deploy FeWo mit PipelineManager / deploy (push) Successful in 5m10s
Deploy FeWo mit PipelineManager / deploy (push) Successful in 5m10s
- Vorgang: „Angebot prüfen und senden“ wird erst angeboten, wenn alle Pflichtangaben da sind („erst wenn alle Angaben da sind“); ebenso wartet „Buchungswunsch bestätigen?“. Die harte Sperre in SendOffer, AutoOffer und DecideBookingWish bestand bereits; jetzt stimmt auch die Anzeige. - System › Betrieb: „Postfach prüfen“ (Verbindung, Anzahl Nachrichten der letzten Tage, nichts wird gelesen oder markiert) und Stand des Abrufs. - Posteingang zeigt letzten erfolgreichen Abruf und letzten Fehler. - Vorgang: neuer Bereich „Eingegangene E-Mails“ mit Lesen und Erkanntem; „Mailverlauf“ heißt jetzt „Gesendete E-Mails“. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6862dec201
commit
3a039e5c50
10 files changed
+206
-3
No files matched your search
@@ -140,6 +140,33 @@ public function fetchAll(): array
|
||||
return $mails;
|
||||
}
|
||||
|
||||
/**
|
||||
* Connects with the given connection data and counts the messages of the last days (check on System › Betrieb).
|
||||
* Nothing is read, marked or stored.
|
||||
*
|
||||
* @param array{host: string, port: int, encryption: string, username: string, password: ?string, folder: string} $config
|
||||
*
|
||||
* @throws ChannelSyncException
|
||||
*/
|
||||
public function probe(array $config): int
|
||||
{
|
||||
try {
|
||||
$client = (new ClientManager)->make([
|
||||
'host' => $config['host'], 'port' => $config['port'], 'encryption' => $config['encryption'], 'validate_cert' => true,
|
||||
'username' => $config['username'], 'password' => $config['password'], 'protocol' => 'imap',
|
||||
]);
|
||||
$client->connect();
|
||||
$count = $client->getFolderByPath($config['folder'])->query()
|
||||
->whereSince(CarbonImmutable::today()->subDays((int) config('fewo.mailbox.lookback_days', 3)))
|
||||
->leaveUnread()->setFetchBody(false)->count();
|
||||
$client->disconnect();
|
||||
} catch (Throwable $exception) {
|
||||
throw new ChannelSyncException('Postfach nicht erreichbar: '.$exception->getMessage(), previous: $exception);
|
||||
}
|
||||
|
||||
return (int) $count;
|
||||
}
|
||||
|
||||
private function toPortalMail(Message $message): PortalMail
|
||||
{
|
||||
$text = $message->getTextBody();
|
||||
|
||||
Reference in new issue
Block a user