Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

110
Visualizações
Trying to add a CC or similar to email function

Currently this function emails the person who inputs their email in the text field and the sender is our API ecommerce email. The To: is the person who made the request. My trouble is I can't seem to add possibly a CC: field to also add so we know who made the request. Below is the function, there's more to it that I can provide if needed.

    $('#emailCart').click(function(e) {

    e.preventDefault();
    Swal.fire({
        title: 'Enter Email',
        input: 'text',
        showCancelButton: true,
        confirmButtonText: 'Email Cart',
        preConfirm: (email) => {
            if (email.length === 0 || !emailIsValid(email)) {
                Swal.showValidationMessage('Please enter a valid email address.');
            }
        }
    }).then((result) => {
        if (result.value) {

            $.ajax({
                url: apiUrl + '/cart/email',
                method: 'post',
                headers: {
                    'X-CSRF-TOKEN': csrfToken
                },
                data: {
                    email: result.value
                },
                success: function() {

                    Swal.fire({
                        type: 'success',
                        title: 'Success',
                        text: 'Your cart has been emailed.',
                        timer: 1500
                    });

                },
                error: function() {

                    Swal.fire({
                        type: 'error',
                        title: 'Oops...',
                        text: 'Cart could not be emailed.'
                    })

                }
            });

        }
    });
 });
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda