Changeset 520c36a in github for program/steps/mail/sendmail.inc


Ignore:
Timestamp:
Oct 11, 2005 5:11:42 PM (8 years ago)
Author:
thomascube <thomas@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
09941ea
Parents:
49afbf5
Message:

Better support for Courier IMAP

File:
1 edited

Legend:

Unmodified
Added
Removed
  • program/steps/mail/sendmail.inc

    r968bdc7 r520c36a  
    217217  // check if mailbox exists 
    218218  if (!in_array_nocase($CONFIG['sent_mbox'], $IMAP->list_mailboxes())) 
    219     $IMAP->create_mailbox($CONFIG['sent_mbox'], TRUE); 
     219    $mbox = $IMAP->create_mailbox($CONFIG['sent_mbox'], TRUE); 
     220  else 
     221    $mbox = TRUE; 
    220222 
    221223  // append message to sent box 
    222   $saved = $IMAP->save_message($CONFIG['sent_mbox'], $header_str."\r\n".$msg_body); 
     224  if ($mbox) 
     225    $saved = $IMAP->save_message($CONFIG['sent_mbox'], $header_str."\r\n".$msg_body); 
     226 
     227  // raise error if saving failed 
     228  if (!$saved) 
     229    raise_error(array('code' => 800, 
     230                      'type' => 'imap', 
     231                      'file' => __FILE__, 
     232                      'message' => "Could not save message in $CONFIG[sent_mbox]"), TRUE, FALSE); 
    223233  } 
    224234 
Note: See TracChangeset for help on using the changeset viewer.