Skip to content

Commit

Permalink
Use replyType() to make this easier to read
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Sep 24, 2013
1 parent d05cee2 commit 5e9f4cf
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions imp/lib/Compose.php
Original file line number Diff line number Diff line change
Expand Up @@ -810,28 +810,22 @@ public function buildAndSendMessage(
$sentmail = $injector->getInstance('IMP_Sentmail');

foreach ($send_msgs as $val) {
switch ($this->_replytype) {
case self::COMPOSE:
$senttype = IMP_Sentmail::NEWMSG;
break;

switch (intval($this->replyType(true))) {
case self::REPLY:
case self::REPLY_ALL:
case self::REPLY_LIST:
case self::REPLY_SENDER:
$senttype = IMP_Sentmail::REPLY;
break;

case self::FORWARD:
case self::FORWARD_ATTACH:
case self::FORWARD_BODY:
case self::FORWARD_BOTH:
$senttype = IMP_Sentmail::FORWARD;
break;

case self::REDIRECT:
$senttype = IMP_Sentmail::REDIRECT;
break;

default:
$senttype = IMP_Sentmail::NEWMSG;
break;
}

try {
Expand Down

0 comments on commit 5e9f4cf

Please sign in to comment.