downloadMail Plugin: Archive Setting

6 posts by 2 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: May 17, 2021   (RSS)

By gversion - March 4, 2021

Hello,

I would like the downloadMail plugin to archive emails instead of deleting them. I am using IMAP and have created a folder in the email account called "archive". I have specified the folder in the settings as:

'archive' => 'archive', // IMAP Only, move messages to this folder instead of deleting them

However the emails are still being deleted. I guess the folder path is incorrect... how can I confirm what the folder path is?

Thank you,

Greg

By gversion - March 4, 2021

By the way, I have disabled test mode so archiving should work:

 'testmode' => false, // (optional) don't archive or erase messages after downloading them

By daniel - May 14, 2021

Hi Greg,

The folder name format may differ depending on mail client, but two that I'm aware of will prefix them with "INBOX." or "INBOX/" so in your case, you can try "INBOX.archive" and "INBOX/archive".

You can also try looking in your background task log - I believe that if the plugin fails to archive it will output a list of available folders in its task log output.

Let me know if you're able to make any progress; there may be some alternate options to find the folder name if the above doesn't work.

Thanks!

Daniel
Technical Lead
interactivetools.com

By daniel - May 17, 2021

Hi Greg,

The next step I'd take would be to build a script that connects to the mailbox and runs PHP's imap_list() manually to retrieve a list of all folders. The PHP documentation page (https://www.php.net/manual/en/function.imap-list.php) has a simple example that should work in most cases, and just require swapping in the correct host/user/password.

Let me know if you have any other questions!

Thanks,

Daniel
Technical Lead
interactivetools.com

By gversion - May 17, 2021

Hi Daniel,

That's fantastic to know, thank you so much for the advice.

Regards,

Greg