SiT! Bugs - SiT!
View Issue Details
0000367SiT!inbound emailpublic2009-01-06 14:192009-02-27 16:27
ivan 
kieran 
normalminorhave not tried
closedfixed 
 
3.453.45 
0000367: Mail connection failures result in blank emails
When there is a mail connection failure like a certificate error when connecting to a secure mail server, instead of failing completely the mail collection appears to work but inserts a blank email into the holding queue.

I've attached output from the error log, note that this error was caused by a space between /ssl and /novalidate-cert in the mail configuration, but this isn't the problem I'm reporting, it's the fact that it doesn't fail gracefully but instead continues and inserts a blank email.

2009-01-06T13:37:17+00:00 auto.php ERROR: Warning imap_open(): Couldn't open stream {#####.##########.co.uk:993/imap/ssl /novalidate-cert/user=}INBOX in /home/paul/sit/includes/fetchSitMail.class.php at line 52
2009-01-06T13:37:17+00:00 auto.php ERROR: Application Error Can't open mailbox {#######.########.co.uk:993/imap/ssl /novalidate-cert/user=}INBOX: invalid remote specification in /home/paul/sit/includes/fetchSitMail.class.php at line 53
2009-01-06T13:37:17+00:00 auto.php ERROR: Warning imap_headers(): supplied argument is not a valid imap resource in /home/paul/sit/includes/fetchSitMail.class.php at line 58
2009-01-06T13:37:17+00:00 auto.php Found 1 email(s) to fetch, Archive folder set to: ''
2009-01-06T13:37:17+00:00 auto.php ERROR: Warning imap_fetchheader(): supplied argument is not a valid imap resource in /home/paul/sit/includes/fetchSitMail.class.php at line 121
2009-01-06T13:37:17+00:00 auto.php Retreiving message 1 from server
2009-01-06T13:37:17+00:00 auto.php ERROR: Warning imap_body(): supplied argument is not a valid imap resource in /home/paul/sit/includes/fetchSitMail.class.php at line 109
2009-01-06T13:37:17+00:00 auto.php Died on mesasge 1 with: Can't open mailbox {#######.##########.co.uk:993/imap/ssl /novalidate-cert/user=}INBOX: invalid remote specification
2009-01-06T13:37:17+00:00 auto.php ERROR: Warning imap_delete(): supplied argument is not a valid imap resource in /home/paul/sit/includes/fetchSitMail.class.php at line 126
2009-01-06T13:37:17+00:00 auto.php ERROR: Application Error Can't open mailbox {#######.########.co.uk:993/imap/ssl /novalidate-cert/user=}INBOX: invalid remote specification in /home/paul/sit/includes/fetchSitMail.class.php at line 126
2009-01-06T13:37:17+00:00 auto.php Array
(
    [Type] => text
    [Description] => Text message
)
2009-01-06T13:37:17+00:00 auto.php ERROR: Warning Invalid argument supplied for foreach() in /home/paul/sit/htdocs/inboundemail.php at line 207
2009-01-06T13:37:17+00:00 auto.php ERROR: Warning mb_convert_encoding(): Illegal character encoding specified in /home/paul/sit/htdocs/inboundemail.php at line 342
2009-01-06T13:37:17+00:00 auto.php ERROR: Warning imap_expunge(): supplied argument is not a valid imap resource in /home/paul/sit/htdocs/inboundemail.php at line 472
2009-01-06T13:37:17+00:00 auto.php ERROR: Warning imap_close(): supplied argument is not a valid imap resource in /home/paul/sit/htdocs/inboundemail.php at line 482
No tags attached.
Issue History
2009-01-06 14:19ivanNew Issue
2009-01-10 12:53kieranNote Added: 0000455
2009-01-10 12:53kieranAssigned To => kieran
2009-01-10 12:53kieranStatusnew => resolved
2009-01-10 12:53kieranResolutionopen => fixed
2009-01-10 12:53kieranFixed in Version => 3.45
2009-01-10 13:00ivanAdditional Information Updated
2009-01-10 13:08paulhNote Added: 0000456
2009-02-27 16:27ivanStatusresolved => closed

Notes
(0000455)
kieran   
2009-01-10 12:53   
Should bomb out on connection failure now, please test.
(0000456)
paulh   
2009-01-10 13:08   
Can confirm this has resolved the issue