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

@sap-cloud-sdk/mail-client

Package Overview
Dependencies
Maintainers
5
Versions
734
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sap-cloud-sdk/mail-client - npm Package Compare versions

Comparing version 2.7.1-20220811075847.0 to 2.7.1-20220811094957.0

6

CHANGELOG.md
# @sap-cloud-sdk/mail-client
## 2.7.1-20220811075847.0
## 2.7.1-20220811094957.0

@@ -8,4 +8,4 @@ ### Patch Changes

- Updated dependencies
- @sap-cloud-sdk/connectivity@2.7.1-20220811075847.0
- @sap-cloud-sdk/util@2.7.1-20220811075847.0
- @sap-cloud-sdk/connectivity@2.7.1-20220811094957.0
- @sap-cloud-sdk/util@2.7.1-20220811094957.0

@@ -12,0 +12,0 @@ ## 2.7.0

import { DestinationOrFetchOptions } from '@sap-cloud-sdk/connectivity';
import { MailOptions, MailResponse } from './mail-client-types';
import { SocksProxy } from 'socks';
import { MailDestination, MailOptions, MailResponse } from './mail-client-types';
/**
* @internal
*/
export declare function buildSocksProxy(mailDestination: MailDestination): SocksProxy;
/**
* Sends e-mails to a target mail server defined in a given destination.

@@ -5,0 +10,0 @@ * Builds a transport between the application and the mail server, sends mails sequentially by using the transport, then closes it.

@@ -6,3 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.sendMail = void 0;
exports.sendMail = exports.buildSocksProxy = void 0;
const connectivity_1 = require("@sap-cloud-sdk/connectivity");

@@ -51,19 +51,28 @@ const internal_1 = require("@sap-cloud-sdk/connectivity/internal");

}
async function createSocket(mailDestination) {
/**
* @internal
*/
function buildSocksProxy(mailDestination) {
if (!mailDestination.proxyConfiguration) {
throw Error('The proxy configuration is undefined, which is mandatory for creating a socket connection.');
}
return {
host: mailDestination.proxyConfiguration.host,
port: mailDestination.proxyConfiguration.port,
type: 5,
// socks doc here: https://github.com/JoshGlazebrook/socks#socksclientoptions
// see customAuthRequestHandler and customAuthResponseHandler for custom auth details.
custom_auth_method: 0x80,
custom_auth_request_handler: () => {
var _a;
return (0, socket_proxy_1.customAuthRequestHandler)((_a = mailDestination.proxyConfiguration) === null || _a === void 0 ? void 0 : _a['proxy-authentication']);
},
custom_auth_response_size: 2,
custom_auth_response_handler: socket_proxy_1.customAuthResponseHandler
};
}
exports.buildSocksProxy = buildSocksProxy;
async function createSocket(mailDestination) {
const connectionOptions = {
proxy: {
host: mailDestination.proxyConfiguration.host,
port: mailDestination.proxyConfiguration.port,
type: 5,
custom_auth_method: 0x80,
custom_auth_request_handler: () => {
var _a;
return (0, socket_proxy_1.customAuthRequestHandler)((_a = mailDestination.proxyConfiguration) === null || _a === void 0 ? void 0 : _a['proxy-authentication']);
},
custom_auth_response_size: 2,
custom_auth_response_handler: socket_proxy_1.customAuthResponseHandler
},
proxy: buildSocksProxy(mailDestination),
command: 'connect',

@@ -70,0 +79,0 @@ destination: {

{
"name": "@sap-cloud-sdk/mail-client",
"version": "2.7.1-20220811075847.0",
"version": "2.7.1-20220811094957.0",
"description": "SAP Cloud SDK for JavaScript e-mail client",

@@ -41,6 +41,6 @@ "homepage": "https://sap.github.io/cloud-sdk/docs/js/overview-cloud-sdk-for-javascript",

"dependencies": {
"@sap-cloud-sdk/connectivity": "^2.7.1-20220811075847.0",
"@sap-cloud-sdk/util": "^2.7.1-20220811075847.0",
"nodemailer": "^6.7.7",
"socks": "^2.7.0"
"@sap-cloud-sdk/connectivity": "^2.7.1-20220811094957.0",
"@sap-cloud-sdk/util": "^2.7.1-20220811094957.0",
"nodemailer": "6.7.7",
"socks": "2.6.2"
},

@@ -47,0 +47,0 @@ "devDependencies": {

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