Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

maildev

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

maildev - npm Package Compare versions

Comparing version 0.13.4 to 0.14.0

app/components/angular-cookies/angular-cookies.js

2

app/scripts/app.js

@@ -7,3 +7,3 @@ /* global angular, io */

var app = angular.module('mailDevApp', ['ngRoute', 'ngResource', 'ngSanitize']);
var app = angular.module('mailDevApp', ['ngRoute', 'ngResource', 'ngSanitize', 'ngCookies']);

@@ -10,0 +10,0 @@ app.config(['$routeProvider', function($routeProvider){

@@ -8,4 +8,4 @@ /* global angular, app */

app.controller('ItemCtrl', [
'$scope', '$rootScope', '$routeParams', '$location', 'Email', '$http',
function($scope, $rootScope, $routeParams, $location, Email, $http) {
'$scope', '$rootScope', '$routeParams', '$location', 'Email', '$http', '$cookies',
function($scope, $rootScope, $routeParams, $location, Email, $http, $cookies) {

@@ -102,2 +102,7 @@ var iframe = null;

function validateEmail(email) {
var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
return re.test(email);
}
addHideDropdownHanlder( window );

@@ -126,4 +131,23 @@

// Relay email to
$scope.relayTo = function(item){
var lastRelayTo = $cookies.relayTo;
var relayTo = prompt("Please enter email address to relay", lastRelayTo);
if (relayTo){
if (validateEmail(relayTo)){
$scope.relay(item, relayTo);
$cookies.relayTo = relayTo;
}
else {
window.alert('The specified email address is not correct.');
}
}
};
// Relay email
$scope.relay = function(item) {
$scope.relay = function(item, relayTo) {

@@ -140,5 +164,6 @@ if (!$rootScope.config.isOutgoingEnabled) {

if (
window.confirm(
'Are you sure you want to REALLY SEND email to ' +
item.to.map(function(to){return to.address;}).join() + ' through ' +
(relayTo ? relayTo : item.to.map(function(to){return to.address;}).join()) + ' through ' +
$rootScope.config.outgoingHost + '?'

@@ -150,3 +175,3 @@ )

method: 'POST',
url: '/email/' + item.id + '/relay'
url: 'email/' + item.id + '/relay' + (relayTo ? '/' + relayTo : '')
})

@@ -153,0 +178,0 @@ .success(function(data, status) {

@@ -8,2 +8,3 @@

var emailRegexp = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;

@@ -123,6 +124,16 @@ module.exports = function(app, mailserver, basePathname) {

// Relay the email
router.post('/email/:id/relay', function(req, res){
router.post('/email/:id/relay/:relayTo?', function(req, res){
mailserver.getEmail(req.params.id, function(err, email){
if (err) return res.status(404).json({ error: err.message });
if (req.params.relayTo) {
if (emailRegexp.test(req.params.relayTo)) {
email.to = [{address: req.params.relayTo}];
email.envelope.to = [ { address: req.params.relayTo, args: false }]
}
else {
return res.status(400).json({ error: 'Incorrect email address provided :' + req.params.relayTo });
}
}
mailserver.relayMail(email, function(err) {

@@ -129,0 +140,0 @@ if (err) return res.status(500).json({ error: err.message });

{
"name": "maildev",
"description": "SMTP Server and Web Interface for reading and testing emails during development",
"version": "0.13.4",
"version": "0.14.0",
"keywords": [

@@ -23,2 +23,5 @@ "email",

},
"scripts": {
"test": "./node_modules/.bin/istanbul cover _mocha"
},
"main": "./index.js",

@@ -30,32 +33,30 @@ "bin": {

"dependencies": {
"async": "^1.5.1",
"commander": "^2.9.0",
"express": "^4.13.4",
"mailparser": "^0.5.3",
"open": "~0.0.5",
"simplesmtp": "^0.3.35",
"smtp-connection": "^2.3.1",
"smtp-server": "^1.4.0",
"socket.io": "^1.4.5",
"wildstring": "^1.0.8"
"async": "1.5.1",
"commander": "2.9.0",
"express": "4.13.4",
"mailparser": "0.5.3",
"open": "0.0.5",
"simplesmtp": "0.3.35",
"smtp-connection": "2.3.1",
"smtp-server": "1.4.0",
"socket.io": "1.4.5",
"wildstring": "1.0.8"
},
"devDependencies": {
"grunt": "^0.4.5",
"grunt-concurrent": "^2.2.1",
"grunt-contrib-jshint": "^1.0.0",
"grunt-contrib-watch": "^1.0.0",
"grunt-nodemon": "^0.4.0",
"grunt-sass": "^1.1.0",
"http-proxy-middleware": "^0.12.0",
"matchdep": "^1.0.1",
"mocha": "^2.2.5",
"nodemailer": "^2.3.0",
"request": "^2.69.0"
"grunt": "0.4.5",
"grunt-concurrent": "2.2.1",
"grunt-contrib-jshint": "1.0.0",
"grunt-contrib-watch": "1.0.0",
"grunt-nodemon": "0.4.1",
"grunt-sass": "1.1.0",
"http-proxy-middleware": "0.12.0",
"istanbul": "0.4.4",
"matchdep": "1.0.1",
"mocha": "2.2.5",
"nodemailer": "2.3.0",
"request": "2.69.0"
},
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"test": "./node_modules/mocha/bin/mocha"
}
}

@@ -149,2 +149,4 @@ # MailDev

**Drupal** -- Install and configure [SMTP](https://www.drupal.org/project/smtp) module or use a library like [SwiftMailer](http://swiftmailer.org/).
## Features

@@ -151,0 +153,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc