Last active
November 24, 2015 16:44
-
-
Save gbrennon/8b06cc84804aadbe366e to your computer and use it in GitHub Desktop.
Funcao para envio de email através da API fastemail
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function enviaEmail(emailData) { | |
$.ajax({ | |
type: "POST", | |
url: "http://fastemail.herokuapp.com/mail", | |
data: JSON.stringify(emailData), | |
contentType: 'application/json; charset=utf-8', | |
dataType: 'json', | |
cache:false, | |
async: false, | |
success: function(data){ | |
alert("Dados enviados com Sucesso!"); | |
limpaCampos(); | |
}, | |
error: function(data){ | |
alert(data); | |
} | |
}); | |
} | |
var emailData = {"receiver": "EMAIL DESTINATÁRIO", "subject": "string contendo assunto!", "content": "STRIGN CONTENDO MENSAGEM"}; | |
enviaEmail(emailData) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment