Wringing my brain to figure out if this is the module or something else, but here is a description of the issue. I set up an email account with all of the settings I've read in other posts, IMAP is working on the server, the "test connection" says it is successful, yet when I try to retrieve messages from the email account when I know they are there, it says "There are no messages to retrieve for _emailaddress____".
Here are all the settings I used:
email address - is correct, I've checked it multiple times. On the email side, I have the setting "Use IMAP folder subscriptions" checked, although I've tried it both ways with that as well (checked and unchecked)
I tried it with and without a second email address, doesn't seem to make a difference.
Folder: INBOX
POP3 or IMAP Mailbox: POP3
no mailbox domain - other posts said it isn't neccessary?
Mailbox port: 110
username and password are correct, tested multiple times
extra commands: tried with and without /notls
Mime preference: Plain text
Security: Disabled
Send error replies: Enabled
From header: with and without 'sender'
Default commands:
type: Forum topic
taxonomy: [Higher Education]
promote: 1
status: 1
format: 3
delete messages after they are processed (tried checked and unchecked, but current checked)
Cron processing: currently disabled, but tried both ways and planned to turn it on once I am done testing
input format: filtered, although that is overridden by the default commands.
You hit "test connection" and you get "Mailhandler was able to connect to the mailbox."
You go to the Mailhandler page and hit retrieve, it says "There are no messages to retrieve for ___email___"
Yet there are several emails in the email account, all marked as unread.
Help please.
Comments
Comment #1
frank ralf commentedHello Keith,
You must be sure to use the email address with which you are registered as a user for your Drupal installation for sending the mail to your mailhandler account as the module uses this email address to verify that you are a legitimate user.
If the email addresses do not match the module simply says that there are no mails for retrieving (which is correct, as there are no legitimate emails...).
Hope that helps.
Kind regards,
Frank
Comment #2
kbourne commentedThanks for your feedback Frank.
If I am interpreting what you are saying correctly, if I use my email keith.bourne@fakesitename.com and that email is linked to an account on the website, emails from that email to the email used in mailhandler should get through with no problems and should be detected when 'retreiving' emails from that account in the mailhandler interface.
If that is what you are saying, then that is something I've already tried. I made sure that all of the emails I was using were from registered users of the site and still no luck. I even tried emails from different accounts with different roles with different levels of administrative access to make sure that wasn't affecting things.
Doing some more testing, I actually tried it without the username and password for the email account and it still says it was able to connect (when using the 'Test Connection' feature). How is it connecting to my email account when I don't even have the username and password entered?
Other tests I ran, I tried it with the wrong password & wrong user account (two separate tests), but it still said it was able to connect.
I suspect that it isn't actually connecting even though it says it is. Otherwise, how would it be able to connect to accounts that don't exist with incorrect passwords?
Comment #3
z.stolar commentedThis sounds very strange.
Mailhandler tries to fetch only new/unseen messages. If your mails are fetched by another client, it might change their headers, and confuse mailhandler. That's just a guess. Verify no other client is doing somethign with those mails, and that you don't have any filter on your mailbox, that automatically marks mails as "read".
About the access even without a password - I have no idea.
Comment #4
frank ralf commentedHello Keith,
To find out whether the problem lies with Drupal, your mail server or your Internet provider, you might use the following PHP script to check the core mail function imap_open():
I found out after some experimenting that my provider doesn't support imap_open() with PHP 5 because of some underlying problem with the mail server in a shared hosting environment.
Hope that helps
Frank
Comment #5
hutch commentedThanks, nice little test script, I had to add /notls after :143 to get it to work
The server I tested it on has a shared hosting environment but uses courier-imap which handles php imap fine
Also works with a dovecot imap server. Both use 'virtual' mail users so no unix permission hassles
Comment #6
mdowsett commentedI'm getting similar responses.
1) I finally got a successful connection message after emptying the 'Mailbox domain' field
2) But it says there are no messages where there is
3) I changed my password to an incorrect password and still get the same successful message (but no mail there).
(I'm using 5.x1-1.4 but it's behaving exactly as the v6 user is explaining.
Here are my settings:
Comment #7
mdowsett commentedI got it working...I luckily added the /notls command in the "Extra Commands" field and it worked like a charm.
I also added in my proper incoming mail server in the "Mailbox domain" field...I'm not sure if that helped at all.
Comment #8
z.stolar commented@mdowsett: I guess your first problem was the missing /notls command. The mailbox domain is usually necessary as well.
Comment #10
R.J. Steinert commentedI found that if I forget to fill out the 'mailbox domain' I will get the symptom described in this report on one of my servers. On another server it will throw dozens of the following error set:
warning: imap_fetchstructure() [function.imap-fetchstructure]: Bad message number in /somedirectory/www/sites/all/modules/mailhandler/mailhandler.retrieve.inc on line 40.
warning: imap_fetchstructure() [function.imap-fetchstructure]: Bad message number in /somedirectory/www/sites/all/modules/mailhandler/mailhandler.retrieve.inc on line 40.
warning: imap_fetchstructure() [function.imap-fetchstructure]: Bad message number in /somedirectory/www/sites/all/modules/mailhandler/mailhandler.retrieve.inc on line 101.
warning: imap_header() [function.imap-header]: Bad message number in /somedirectory/www/sites/all/modules/mailhandler/mailhandler.retrieve.inc on line 369.
Comment #11
danepowell commentedSorry, 6.x-1.x is no longer a supported release. Please try upgrading to 6.x-2.x and reopen if still an issue.