backbone.js - How to send email using Backbone and c# form -
i'm working on simple backbone project fetches items database , displays it. model not changed there's not need post model database. however, have form when it's posted sends email recipients (which backbone fetches database). i'm using c# back-end project. how can achieve this?
here's html
<form name="bmsemail" id="bmsemail" role="form"> <fieldset> <div class="form-group"> <input type="text" autocomplete="off" name="name" id="name" class="form-control" placeholder="username" /> </div> <div class="form-group"> <input type="text" autocomplete="off" name="patientid" id="patientid" class="form-control" placeholder="patient id" /> </div> <div class="form-group"> <textarea rows="11" name="message" id="message" class="form-control" placeholder="message"></textarea> </div> <div class="form-group"> <button type="submit" class="btn btn-info">submit</button> </div> </fieldset> </form> app.views.emailform = backbone.view.extend({ tagname: 'div', id: 'emailform', template: template('email-form'), events:{ "submit form": "formsubmit" }, formsubmit:function(e) { e.preventdefault(); }, render: function () { this.$el.append(this.template()) return this; } });
you'll need post data want send server , there use smtp (http://msdn.microsoft.com/pt-br/library/system.net.mail.smtpclient(v=vs.110).aspx) class asp.net send email.
via browser impossible because need configurations send mail.
Comments
Post a Comment