tips:imap2wiki
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
wiki:tips:imap2wiki [2007-06-06 11:14] – commented 87.111.36.184 | tips:imap2wiki [2010-01-26 20:26] (current) – 74.93.99.97 | ||
---|---|---|---|
Line 7: | Line 7: | ||
Regard this as experimental, | Regard this as experimental, | ||
- | Please | + | Please |
====== How to use ====== | ====== How to use ====== | ||
- | - adapt the configuration data below to match your IMAP account, replace the imapserver | + | - adapt the configuration data below to match your IMAP account, replace the imapserver |
- put the script somewhere on your server | - put the script somewhere on your server | ||
- you may run it manually or have it run as a cronjob | - you may run it manually or have it run as a cronjob | ||
- | |||
===== Code ===== | ===== Code ===== | ||
- | <code php> | + | <file php imap2wiki.php> |
<? | <? | ||
Line 26: | Line 25: | ||
* Usage: | * Usage: | ||
* | * | ||
- | * Gets email from imap account and adds it to a dokuwiki | + | * Gets email from imap account and adds it to a DokuWiki |
* Typically used to give offline/ | * Typically used to give offline/ | ||
* Subject of email indicates namespace and pagename that will be used to add comments to | * Subject of email indicates namespace and pagename that will be used to add comments to | ||
Line 35: | Line 34: | ||
* Todo : error checking for nasty situations: | * Todo : error checking for nasty situations: | ||
- subject is not valid wiki namespace | - subject is not valid wiki namespace | ||
- | - imap server does not respond | + | - IMAP server does not respond |
- posting does not succeed | - posting does not succeed | ||
* @license | * @license | ||
* @author | * @author | ||
- | * @thanks Andreas Gohr, Harry Fuecks, Christopher Arndt, Christopher Smith and dokuwiki | + | * @thanks Andreas Gohr, Harry Fuecks, Christopher Arndt, Christopher Smith and DokuWiki |
*/ | */ | ||
// SETUP | // SETUP | ||
- | $host =" | + | $host =" |
- | $dokuwikipath ="/ | + | $dokuwikipath ="/ |
$discussionprefix = " | $discussionprefix = " | ||
$imapuser =" | $imapuser =" | ||
Line 115: | Line 114: | ||
///////////////////////////////////////////////////////////////////// | ///////////////////////////////////////////////////////////////////// | ||
- | // connect to imap server 82.62.3.23 | + | // connect to IMAP server 82.62.3.23 |
$mailbox = imap_open(" | $mailbox = imap_open(" | ||
Line 175: | Line 174: | ||
?> | ?> | ||
- | </code> | + | </file> |
- | + | ||
====== Discussion ====== | ====== Discussion ====== | ||
Line 185: | Line 182: | ||
But the wiki is not updated with the new info. | But the wiki is not updated with the new info. | ||
- | Also i had to add /notls to the imap_server config to disable | + | Also i had to add /notls to the imap_server config to disable |
-- | -- | ||
Check your serverlog if the connection has been made. Did you change the URL to match your domain? Standard replies are posted to the // | Check your serverlog if the connection has been made. Did you change the URL to match your domain? Standard replies are posted to the // | ||
+ | |||
+ | -- | ||
+ | * Is there a way to connect to Gmail using this method? Thanks. | ||
+ |
tips/imap2wiki.txt · Last modified: 2010-01-26 20:26 by 74.93.99.97