Skip to content
Loading
Send Email By Send Grid,  
  • class="form-group">  
  • class="form-control form-contact-msg" rows="5" id="htmlContent" placeholder="Enter Your Message" required>  
  •   
  • class="submit-contact" type="button" id="btnSend">Submit  
  •   
  •   
  •   
  •   
  •   
  •   
  •   
  •   
  • "https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js">  
  • "text/javascript">  
  • $(function () {  
  • $("#btnSend").click(function (e) {  
  • e.preventDefault();  
  • var record = {  
  • "htmlContent": $("#htmlContent").val(),  
  • "toEmail": $("#toEmail").val(),  
  • "subject": $("#subject").val(),  
  • "htmlContent": $("#htmlContent").val(),  
  • "contact": $("#contact").val(),  
  • };  
  • $.ajax({  
  • url: '/Genric/SendMail',  
  • type: "GET",  
  • data: record,  
  • contentType: "application/json; charset=utf-8",  
  • success: function () {  
  • $("#form").reset();  
  • },  
  • error: function () {  
  • },  
  • failure: function () {  
  • }  
  • });  
  • });  
  • });  
  •    
  • My result is 
     

    Demo

    Inbox

    info@

    4:19 PM (56 minutes ago)
     
    to me
    Demo  -not here UserName 

    2 Replies

    Know the answer? Post it — somebody with the same question will find it here.