meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:imap2 [2025/02/08 10:58] – [Purpose] duncancplugin:imap2 [2025/05/29 10:39] (current) – [Installation] duncanc
Line 20: Line 20:
 ===== Installation ===== ===== Installation =====
  
-See the README file on the GitHub page https://github.com/bramley/phplist-plugin-imap2 for how to install the plugin.+Install on the Manage Plugins page (menu Config > Manage Plugins) using the package URL 
 +    https://github.com/bramley/phplist-plugin-imap2/archive/master.zip 
 + 
 +Then enable the Common plugin.
  
 ===== Usage ===== ===== Usage =====
Line 32: Line 35:
  
 === Use IMAP instead of POP3 === === Use IMAP instead of POP3 ===
-The php-imap2 package supports only the IMAP protocol, not the POP3 protocol. This is compatible with the phplist bounce processing.+The php-imap2 package supports only the IMAP protocol, not the POP3 protocol. This is compatible with the phplist bounce processing and should not be a problem.
  
 The plugin will detect when POP3 is trying to be used and change the port and protocol to the equivalent IMAP values but for clarity you may want to change the setting in the config.php file. You might also need to change the value of ''$bounce_mailbox_host'' because that might differ between POP3 and IMAP. The plugin will detect when POP3 is trying to be used and change the port and protocol to the equivalent IMAP values but for clarity you may want to change the setting in the config.php file. You might also need to change the value of ''$bounce_mailbox_host'' because that might differ between POP3 and IMAP.
Line 53: Line 56:
  
  
 +=== Debugging ===
 +
 +You can log the dialogue with the mail server by including ''/debug'' within the value of ''$bounce_mailbox_port'', e.g. 
 +
 +<code php>$bounce_mailbox_port = '993/imap/ssl/debug';</code>
 +
 +and by setting a variable in config.php
 +
 +<code php>$log_options = [
 +    'threshold' => 'DEBUG',
 +];</code>
 +
 +Now the plugin will write the dialogue to a file in the phplist temporary directory, identfied by the ''$tmpdir'' variable in config.php. The file will be named for the current day, ''log_yyyy-mm-dd.txt''
 +
 +Alternatively you can specify a particular directory for the log file. The directory must be writeable by the web server process. 
 +<code php>$log_options = [
 +    'threshold' => 'DEBUG',
 +    'dir' => '/path/to/directory',
 +];</code>
  
 +The dialogue will be logged similar to this
  
 +<code>[06:33:10] [debug] [BC29] Connecting to ssl://imap.gmail.com:993...
 +[06:33:10] [debug] [BC29] S: * OK Gimap ready for requests from 87.115.225.95 h41mb25057261wmp
 +[06:33:10] [debug] [BC29] C: A0001 CAPABILITY
 +[06:33:10] [debug] [BC29] S: * CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1 XYZZY SASL-IR AUTH=XOAUTH2 AUTH=PLAIN AUTH=PLAIN-CLIENTTOKEN AUTH=OAUTHBEARER
 +</code>