Skip to content

Commit

Permalink
fix(imap): composer dep + better entry creation
Browse files Browse the repository at this point in the history
  • Loading branch information
mrflos committed Jun 25, 2024
1 parent c952216 commit b23a6dc
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 3 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"require": {
"league/html-to-markdown": "^5.1"
"league/html-to-markdown": "^5.1",
"php-imap/php-imap": "^5.0"
},
"config": {
"autoloader-suffix": "importer"
Expand Down
72 changes: 71 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion services/ImapImporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public function syncData($data)
$res = multiArraySearch($existingEntries, 'message_id', $entry['message_id']);
if (!$res) {
$entry['antispam'] = 1;
$this->entryManager->create($this->config['formId'], $entry, false, $entry['formId']);
$this->entryManager->create($this->config['formId'], $entry, false);
echo 'L\'email "' . $entry['bf_titre'] . '" a été créé.' . "\n";
} else {
echo 'L\'email "' . $entry['bf_titre'] . '" existe déja.' . "\n";
Expand Down

0 comments on commit b23a6dc

Please sign in to comment.