-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ajustamos el buildeo de los entornos, con handlebars en el medio. Agr…
…egamos tareas de limpieza para dist y build
- Loading branch information
Showing
5 changed files
with
93 additions
and
26 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
{ | ||
"name": "<%= mailName %>", | ||
"version": "<%= mailVersion %>", | ||
"description": "<%= mailDescription %>", | ||
"author": "<%= authorName %>", | ||
"name": "email-enviroment", | ||
"version": "0.2.0", | ||
"description": "An enviroment to compose an email", | ||
"author": "Santiago Barchetta <[email protected]", | ||
"license": "ISC", | ||
"repository" : { | ||
"type" : "git", | ||
"url" : "<%= repositoryURL %>" | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/dudesl/email-enviroment" | ||
}, | ||
"dependencies": { | ||
"browser-sync": "^2.10.0", | ||
"del": "^2.2.0", | ||
"gulp": "^3.9.0", | ||
"gulp-compile-handlebars": "^0.6.1 ", | ||
"gulp-inline-css": "^3.0.0", | ||
"gulp-load-plugins": "^1.2.2", | ||
"gulp-sass": "^2.1.0", | ||
"gulp-sourcemaps": "^1.6.0", | ||
"gulp-util": "^3.0.7", | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
var http = require('http'); | ||
var mailgun = require('mailgun-js')({ | ||
// configuración de una cuenta própia en mailgun. | ||
// Por el momento se puede usar sin problema. | ||
apiKey: 'key-f1d1f5a41e5528beaeb63f35b6a7c80c', | ||
domain: 'sandboxd2cba16debb04c3a9d37570b82f0c884.mailgun.org' | ||
// apiKey: 'key', | ||
// domain: 'sandbox' | ||
}); | ||
|
||
var url = 'http://localhost:3000'; | ||
var body = ''; | ||
|
||
var data = { | ||
from: 'Mailgun Postmaster <[email protected]>', | ||
subject: '[TEST] Email Marketing', | ||
subject: '[TEST] Email Test', | ||
// Dirección de Litmus para generar un nuevo checklist de prueba | ||
// Se pueden agregar sucesivas direcciones email1@test.com, [email protected], [email protected] | ||
to: '[email protected]' | ||
} | ||
|
||
|
@@ -26,7 +28,16 @@ http.get(url, function(res) { | |
|
||
res.on("end", function () { | ||
data.html = body; | ||
mailgun.messages().send(data, function (err, body) {}) | ||
mailgun.messages().send(data, function (err, body) { | ||
if (!err) { | ||
console.log('Email sended [res code: '+ res.statusCode + ']') | ||
console.log('Status : ' + res.statusCode) | ||
} else { | ||
console.log('Error en el envío del mail.'); | ||
console.log('[Error obj: ' + err +']'); | ||
console.log('[res code: '+ res.statusCode + ']'); | ||
} | ||
}) | ||
}); | ||
|
||
} else { | ||
|