<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Mail</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">

<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<script src="//cdn.ckeditor.com/4.7.1/full-all/ckeditor.js"></script>

</head>

<body>
<div class="container">
	<div class="row">
    	<div class="col-md-10">
        	<h3 class="text-danger">Send Mail</h3>
            <?php echo $this->session->flashdata("msg");?>
            <form action="<?php echo base_url().'home/send_cmail';?>" method="post" enctype="multipart/form-data">
            	<div class="row">
            	<div class="form-group col-md-6">
                	<label>Set From</label>
                    <input type="email" name="from" class="form-control" required>
                </div>
                
                <div class="form-group col-md-6">
                	<label>Subject</label>
                    <input type="text" name="subject" class="form-control" required>
                </div>
                <div class="form-group col-md-8">
                	<label>Emails to Send(Comma Seperated)</label>
                    <input type="text" name="to" class="form-control" required>
                </div>
                <div class="form-group col-md-4">
                	<label>CC</label>
                    <input type="text" name="cc" class="form-control">
                </div>
                </div>
                
                <div class="form-group">
                	<label>Body</label>
                    <textarea class="form-control" name='mailContents' id='mailContents' rows="3" required></textarea>
                </div>
                <div class="row">
            	<div class="form-group col-md-6">
                	<label>File Upload</label>
                    <input type="file" name="rect" class="form-control">
                </div>
                <div class="form-group col-md-6">
                	<label>Enter Code</label>
                    <input type="number" name="code" class="form-control" required>
                </div>
                </div>
                <button type="submit" class="btn btn-primary">Send Mail</button>
            </form>
        </div>	
    </div>	
</div>
</body>
<script>
CKEDITOR.replace( 'mailContents', {
	toolbar: [
		    { name: 'document', items : [ 'Preview','Templates' ] },
            { name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
            { name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ] },           
            '/',
            { name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
            { name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv',
                '-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ] },
            { name: 'links', items : [ 'Link','Unlink','Anchor' ] },
            { name: 'insert', items : [ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe' ] },
            '/',
            { name: 'styles', items : [ 'Styles','Format','Font','FontSize' ] },
            { name: 'colors', items : [ 'TextColor','BGColor' ] },
            { name: 'tools', items : [ 'Maximize', 'ShowBlocks','-','About' ] }
	]
});
</script>
</html>
