title: How to know mail was send or not in zend 2
body: <p>i wrote a code for sending email, after successfully send it cant return any status </p>
  
  <pre><code>$message = new \Zend\Mail\Message();
      $htmlPart = new MimePart($body);
      $htmlPart-&gt;type = "text/html";
  
      $textPart = new MimePart($body);
      $textPart-&gt;type = "text/plain";
  
      $body = new MimeMessage();
      $body-&gt;setParts(array($textPart, $htmlPart));
  
      $message-&gt;setBody( $body );
      $message-&gt;setFrom('it.test.com');
      $message-&gt;addTo( $this-&gt;to ); // $message-&gt;addTo($RequesterEmailAddr);
      $message-&gt;setSubject( $this-&gt;subject );
      $message-&gt;getHeaders()-&gt;get('content-type')-&gt;setType('multipart/alternative');
      $smtpOptions = new \Zend\Mail\Transport\SmtpOptions();  
      $smtpOptions-&gt;setHost('smtp.test.com')
                  -&gt;setConnectionClass('login')
                  -&gt;setName('smtp.test.com')
                  -&gt;setConnectionConfig(array(
                      'username' =&gt; $this-&gt;Username_Email,
                      'password' =&gt; $this-&gt;Password_Email,
                      'ssl' =&gt; 'tls',
                      'port' =&gt; 25,
                  ));
      $transport  = new \Zend\Mail\Transport\Smtp($smtpOptions);
      $MailStatus = $transport-&gt;send($message) ;
  
  $MailStatus  
  </code></pre>
  
  <p>above variable returning nothing after successfully send email
  Plase help me</p>