forked from SAP/cloud-sdk-js
-
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.
feat: support send email with proxy type: internet (SAP#2641)
- Loading branch information
1 parent
ec3c27d
commit 05d82aa
Showing
24 changed files
with
770 additions
and
65 deletions.
There are no files selected for viewing
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
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
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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<!-- sap-cloud-sdk-logo --> | ||
<!-- This block is inserted by scripts/replace-common-readme.ts. Do not adjust it manually. --> | ||
<a href="https://sap.com/s4sdk"><img src="https://help.sap.com/doc/2324e9c3b28748a4ae2ad08166d77675/1.0/en-US/logo-with-js.svg" alt="SAP Cloud SDK for JavaScript Logo" height="122.92" width="226.773"/></a> | ||
<!-- sap-cloud-sdk-logo-stop --> | ||
|
||
# @sap-cloud-sdk/mail-client (experimental) | ||
With the SAP Cloud SDK mail client you can leverage the connectivity and destination services on SAP BTP to send e-mails from your application. | ||
|
||
## This package is experimental | ||
The API of this package is not stable and will likely change in future versions. | ||
|
||
## Installation | ||
|
||
``` | ||
$ npm install @sap-cloud-sdk/mail-client | ||
``` | ||
|
||
## Usage | ||
|
||
Use the `sendMail` function to send e-mails. | ||
|
||
```ts | ||
`sendMail`(destination, { from: '[email protected]', to: '[email protected]', subject: 'subject', text: 'text' }); | ||
``` | ||
|
||
<!-- sap-cloud-sdk-common-readme --> | ||
<!-- This block is inserted by scripts/replace-common-readme.ts. Do not adjust it manually. --> | ||
## Support | ||
|
||
The recommended way to get in touch with us is to create an issue on [GitHub](https://github.com/SAP/cloud-sdk-js/issues). | ||
Select the issue category `Bug`, `Feature` or `Question` depending on the nature of your request. | ||
We try to provide fixes, features and answers as soon as possible. | ||
|
||
## Contribute | ||
|
||
If you would like to contribute to the SAP Cloud SDK, please make yourself familiar with our [contributing guidelines](https://github.com/SAP/cloud-sdk-js/blob/main/CONTRIBUTING.md) and follow the given instructions. | ||
|
||
## Links | ||
|
||
- [Github](https://github.com/SAP/cloud-sdk-js) | ||
- [Github - Releases](https://github.com/SAP/cloud-sdk-js/releases) | ||
|
||
<br> | ||
|
||
- [SAP Cloud SDK Documentation portal](https://sap.github.io/cloud-sdk/) | ||
- [SAP Cloud SDK Documentation portal - Getting started guide](https://sap.github.io/cloud-sdk/docs/js/getting-started) | ||
- [SAP Cloud SDK Documentation portal - API documentation](https://sap.github.io/cloud-sdk/docs/js/api-reference-js-ts) | ||
|
||
<br> | ||
|
||
- [developers.sap.com - Product Overview](https://developers.sap.com/topics/cloud-sdk.html) | ||
- [developers.sap.com - Tutorials](https://developers.sap.com/tutorial-navigator.html?tag=products:technology-platform/sap-cloud-sdk/sap-cloud-sdk&tag=topic:javascript) | ||
|
||
## License | ||
|
||
The SAP Cloud SDK is released under the [Apache License Version 2.0.](http://www.apache.org/licenses/) | ||
<!-- sap-cloud-sdk-common-readme-stop --> |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// eslint-disable-next-line import/no-internal-modules | ||
export * from './dist/internal'; | ||
// # sourceMappingURL=internal.d.ts.map |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
'use strict'; | ||
function __export(m) { | ||
for (const p in m) { | ||
if (!exports.hasOwnProperty(p)) { | ||
exports[p] = m[p]; | ||
} | ||
} | ||
} | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
__export(require('./dist/internal')); | ||
// # sourceMappingURL=internal.js.map |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// eslint-disable-next-line | ||
const commonConfig = require('../../test-resources/jest.common.config'); | ||
module.exports = { | ||
...commonConfig, | ||
displayName: 'mail-client' | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"name": "@sap-cloud-sdk/mail-client", | ||
"version": "2.6.0", | ||
"description": "SAP Cloud SDK for JavaScript e-mail client", | ||
"homepage": "https://sap.github.io/cloud-sdk/docs/js/overview-cloud-sdk-for-javascript", | ||
"license": "Apache-2.0", | ||
"keywords": [ | ||
"sap-cloud-sdk", | ||
"cloud-sdk", | ||
"sap-cloud-platform", | ||
"mail", | ||
"client" | ||
], | ||
"main": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"files": [ | ||
"dist/**/*.js", | ||
"dist/**/*.js.map", | ||
"dist/**/*.d.ts", | ||
"dist/**/*.d.ts.map", | ||
"internal.js", | ||
"internal.d.ts" | ||
], | ||
"repository": "github:SAP/cloud-sdk-js", | ||
"scripts": { | ||
"compile": "tsc -b", | ||
"prepublishOnly": "yarn compile && yarn readme", | ||
"test": "yarn test:unit", | ||
"test:unit": "jest", | ||
"coverage": "jest --coverage", | ||
"lint": "eslint --ext .ts . && prettier . --config ../../.prettierrc --ignore-path ../../.prettierignore -c", | ||
"lint:fix": "set TIMING=1 && eslint --ext .ts . --fix --quiet && prettier . --config ../../.prettierrc --ignore-path ../../.prettierignore -w --loglevel error", | ||
"check:dependencies": "depcheck .", | ||
"check:public-api": "ts-node ../../scripts/check-public-api-cli.ts", | ||
"readme": "ts-node ../../scripts/replace-common-readme.ts" | ||
}, | ||
"dependencies": { | ||
"@sap-cloud-sdk/connectivity": "^2.5.0", | ||
"@sap-cloud-sdk/util": "^2.5.0", | ||
"nodemailer": "^6.7.6" | ||
}, | ||
"devDependencies": { | ||
"@types/nodemailer": "^6.4.4", | ||
"typescript": "~4.7.4" | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export { sendMail } from './mail-client'; | ||
export type { | ||
MailOptions, | ||
Address, | ||
Attachment, | ||
AttachmentLike, | ||
Headers, | ||
Envelope, | ||
MailResponse, | ||
MailDestination | ||
} from './mail-client-types'; |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './mail-client'; | ||
export * from './mail-client-types'; |
Oops, something went wrong.