original_string: public function send($email, $fromName, $fromEmail)
      {
          try {
              $mailer = Yii::$app->mailer->compose();
              $mailer->setFrom([$fromEmail => $fromName]);
              $mailer->setTo($email['email']);
              $mailer->setSubject($email['subject']);
              $mailer->setHtmlBody($email['content']);
              $mailer->setTextBody(strip_tags(str_replace(
                  ['<br>', '<br/>', '<br />', '</p>'],
                  "\n",
                  $email['content']
              )));
              return $mailer->send();
          } catch (Exception $e) {
              Log::error($e->getMessage(), null, __METHOD__);
          }
      }
code: public function send($email, $fromName, $fromEmail)
      {
          try {
              $mailer = Yii::$app->mailer->compose();
              $mailer->setFrom([$fromEmail => $fromName]);
              $mailer->setTo($email['email']);
              $mailer->setSubject($email['subject']);
              $mailer->setHtmlBody($email['content']);
              $mailer->setTextBody(strip_tags(str_replace(
                  ['<br>', '<br/>', '<br />', '</p>'],
                  "\n",
                  $email['content']
              )));
              return $mailer->send();
          } catch (Exception $e) {
              Log::error($e->getMessage(), null, __METHOD__);
          }
      }
code_tokens: public function send ( $ email , $ fromName , $ fromEmail ) { try { $ mailer = Yii :: $ app -> mailer -> compose ( ) ; $ mailer -> setFrom ( [ $ fromEmail => $ fromName ] ) ; $ mailer -> setTo ( $ email [ 'email' ] ) ; $ mailer -> setSubject ( $ email [ 'subject' ] ) ; $ mailer -> setHtmlBody ( $ email [ 'content' ] ) ; $ mailer -> setTextBody ( strip_tags ( str_replace ( [ '<br>' , '<br/>' , '<br />' , '</p>' ] , "\n" , $ email [ 'content' ] ) ) ) ; return $ mailer -> send ( ) ; } catch ( Exception $ e ) { Log :: error ( $ e -> getMessage ( ) , null , __METHOD__ ) ; } }
docstring: Sends email using mailer component.
  @param string $email
  @param string $fromName
  @param string $fromEmail
  @return bool
docstring_tokens: Sends email using mailer component .