Send list by email

Asked

Viewed 53 times

0

I have a button that calls this function in jQuery.

sendBtn.click(function(){
    $('#dialog-confirm-send').dialog({
        resizable: false,
        modal: true,
        buttons: [  {   
            text: "Cancelar",
            click: function(){
                $(this).dialog('close');}
            },
            {   
            text: "Enviar",
            click: function(){
                var content = $('.cart-item');
                envia(content, email);
                content.remove();
                $('cart-content').find('.placeholder').show();
                $(this).dialog('close');
                sendBtn.fadeOut('500');
                sendText.fadeIn('500');}
            }
        ]                   
    })
    return false;
});     

Editing: I would like to take the list and send it to another function. this other function will send php script via post. I’m not getting the list to send. I’ve done the job envia() and I’m calling her. she’s running normal, but she doesn’t take the list. On the console it says only object. Below the function:

function envia(content, email){
   alert("Eu alert!" + email);
}

Thanks in advance

  • 2

    Front-end cannot send emails except with protocol maito:, but it will depend on having installed an email client on the user’s machine and "approve" the action. If you want this you can only do it in the back end with SMTP (using a server language/technology like C#, python, php, etc)

  • 2
  • can I use php. this function ta inside a js

  • or this function could send the data to another function that would send the data via ajax/post

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.