Wednesday 17 May 2017

How to send an email to a specific recipient from a HTML form and add it to a html table as a record?

<!-- Placeorder part -->
                <div data-ng-show = "isPlaceOrder">
                                <div class = "col-lg-10" style = "margin-top:80px">
                                <div class="panel panel-primary">
                                <div class = "panel-heading">Drug Request Mail Sender</div>
                                <div class = "panel-body">
                                <div class = "row">
                                <div class = "col-lg-12">
                                        <form role = "form">
                                                <div class = "form-group">
                                                        <label>Form</label>
                                                        <input class = "form-control" disabled value = "chief.techmed@gmail.com">
                                                </div>
                                                <div class = "form-group">
                                                        <label>To</label>
                                                        <input class = "form-control">
                                                        <p class = "help-block">reciever.ex@gmail.com</p>
                                                </div>
                                                <div class = "form-group">
                                                        <label>Subject</label>
                                                        <input class = "form-control" placeholder = "Drug reorder request for Acetalin 50mg">
                                                </div>
                                                <div class = "form-group">
                                                        <label>Content</label>
                                                        <textarea class = "form-control" rows = "7"></textarea>
                                                </div>
                                                <button type = "button" class = "btn btn-success">Send</button>
                                        </form>
                                </div>
                                </div>
                                </div>
                                </div>
                                                        <!-- Sent Mail Added Table -->
                                                                <div class = "col-lg-12" style = "margin-top:80px">
                                                                <div class = "panel panel-primary">
                                                                <div class = "panel-heading">Mail History For Selected Drugs</div>
                                                                <div class = "panel-body">
                                                                        <div class = "row">
                                                                                        <div class = "col-lg-12">
                                                                                                <div class = "table-responsive">
                                                                                                        <table class = "table table-striped table-bordered table-hover">
                                                                                                                <thead>
                                                                                                                        <tr>
                                                                                                                                <th>#</th>
                                                                                                                                <th>Date</th>
                                                                                                                                <th>Time</th>
                                                                                                                                <th>From</th>
                                                                                                                                <th>To</th>
                                                                                                                                <th>Subject</th>
                                                                                                                                <th>Content</th>
                                                                                                                        </tr>
                                                                                                                </thead>
                                                                                                                <tbody>
                                                                                                                        <tr>
                                                                                                                                <td>1</td>
                                                                                                                                <td>2016-12-08</td>
                                                                                                                                <td>07:23:00</td>
                                                                                                                                <td>chief.techmed@gmail.com</td>
                                                                                                                                <td>malmal@gmail.com</td>
                                                                                                                                <td>Urgent</td>
                                                                                                                                <td>We need 20 packs of Anatalyn 500mg</td>
                                                                                                                        </tr>
                                                                                                                        <tr>
                                                                                                                                <td>2</td>
                                                                                                                                <td>2017-01-08</td>
                                                                                                                                <td>12:23:00</td>
                                                                                                                                <td>chief.techmed@gmail.com</td>
                                                                                                                                <td>anta@gmail.com</td>
                                                                                                                                <td>Immediate</td>
                                                                                                                                <td>We need 50 packs of Parasitamol 100mg</td>
                                                                                                                        </tr>
                                                                                                                        <tr>
                                                                                                                                <td>3</td>
                                                                                                                                <td>2017-02-08</td>
                                                                                                                                <td>08:23:00</td>
                                                                                                                                <td>chief.techmed@gmail.com</td>
                                                                                                                                <td>suga@gmail.com</td>
                                                                                                                                <td>General</td>
                                                                                                                                <td>We need 10 packs of Thylin 50mg</td>
                                                                                                                        </tr>
                                                                                                                </tbody>
                                                                                                        </table>
                                                                                                </div>
                                                                                                </div>
                                                                                                </div>
                                                                                                </div>
                                                                                                </div>
                                                                                                </div>
                                                </div>
                                        <!-- End of Placeorder part -->

I'm trying to send an email to a specific recipient through this form which is implemented in html above.And also i want to add that message details to to table which is placed below as a regular record.So can anyone tell me how to do this in an exact way?

I can provide you with any specific parts of my project in order of need.For an example,the node server part which i implemented in nodejs.



via HKhan

No comments:

Post a Comment