 <div class="list-group">
   <div class="list-group-item"><i class="fa fa-fw fa-envelope-o"></i> <?php echo $wo['lang']['mailing_users']; ?></div>
   <div class="setting-well">
   <form method="post" action="" class="setting-mailnglist-container">
            <h5><?php echo $wo['lang']['new_email'];?> <small>(<?php echo $wo['lang']['html_allowed'];?>)</small></h5>
            <div class="send-errors"></div>
            <div class="form-group">
               <input name="subject" type="text" class="form-control" placeholder="<?php echo $wo['lang']['mailing_subject'];?>">
            </div>
            <div class="form-group">
               <textarea name="message" class="form-control" placeholder="<?php echo $wo['lang']['mailing_message'];?>" rows="10" cols="20"></textarea>
            </div>
            <div class="form-group">
               <input type="checkbox" name="test_message"> <?php echo $wo['lang']['test_message'];?> <small>(<?php echo $wo['lang']['send_me_to_my_email'];?>)</small>
            </div>
            <div class="row">
               <div class="col-sm-3 pull-left">
                  <button type="submit" class="form-control btn-main">
                  <i class="fa fa-paper-plane-o progress-icon" data-icon="paper-plane-o"></i> <?php echo $wo['lang']['send'];?>
                  </button>
               </div>
               <div class="setting-saved-update-alert milinglist"></div>
            </div>
         </form>
         </div>
<script>
	$(function () {
   $('form.setting-mailnglist-container').ajaxForm({
      url: Wo_Ajax_Requests_File() + '?f=admin_setting&s=send_mail_to_all_users',
      beforeSend: function () {
         Wo_progressIconLoader($('form.setting-mailnglist-container').find('button'));
         $('.setting-saved-update-alert.milinglist').hide().fadeIn(200).html('<i class="fa fa-clock-o"></i><span id="loading"> Please wait <span>.</span><span>.</span><span>.</span></span>');
      },
      success: function (data) {
         if (data.status == 400) {
            $('.send-errors').html('<div class="alert alert-danger"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>' + data.message + '</div>');
            $('.setting-saved-update-alert.milinglist').fadeOut(200);
         } else if (data.status == 200) {
            $('.setting-saved-update-alert.milinglist').hide().fadeIn(200).html('<i class="fa fa-check"></i> Messges Sent').delay(2000).fadeOut(200);
            $('.send-errors').empty();
         }
         Wo_progressIconLoader($('form.setting-mailnglist-container').find('button'));
      }
   });
});
</script>