Javascript mailto function

If you want to send an email using client side script or link , you can easily do that , by your own custom subject and body message.

 function ShareCart() {

                    var email = prompt(“Enter the email of your friend to share your cart !”, “Alert”);

                    var subject = ‘Share Your Cart’;
                 
                    var message = ‘Your message goes here’             
               
                    var MailingLink = ‘mailto:’ + email + ‘?subject=’ + subject + ‘&body=’ + message;

                    window.open(MailingLink, “”, “”);
                              
                }

Leave a Reply

Your email address will not be published. Required fields are marked *