Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#174710415] Send confirmation email to user after data delete #86

Merged
merged 6 commits into from
Sep 22, 2020

Conversation

balanza
Copy link
Contributor

@balanza balanza commented Sep 21, 2020

Send a confirmation email to a user after his/her data is been deleted.

@codecov-commenter
Copy link

codecov-commenter commented Sep 21, 2020

Codecov Report

Merging #86 into master will decrease coverage by 2.85%.
The diff coverage is 74.89%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #86      +/-   ##
==========================================
- Coverage   86.62%   83.77%   -2.86%     
==========================================
  Files          39       43       +4     
  Lines        1249     1473     +224     
  Branches       88      123      +35     
==========================================
+ Hits         1082     1234     +152     
- Misses        166      234      +68     
- Partials        1        5       +4     
Impacted Files Coverage Δ
SendUserDataDeleteEmailActivity/handler.ts 37.50% <37.50%> (ø)
DeleteUserDataActivity/utils.ts 34.21% <50.00%> (ø)
utils/conversions.ts 81.81% <58.33%> (-6.82%) ⬇️
GetUser/handler.ts 90.27% <63.63%> (-1.91%) ⬇️
ExtractUserDataActivity/handler.ts 77.30% <70.96%> (-0.71%) ⬇️
UserDataDeleteOrchestrator/handler.ts 89.65% <73.68%> (-3.13%) ⬇️
DeleteUserDataActivity/backupAndDelete.ts 92.85% <87.09%> (ø)
GetProfileActivity/handler.ts 90.69% <90.69%> (ø)
GetServices/handler.ts 84.84% <94.73%> (-0.34%) ⬇️
CreateService/handler.ts 85.18% <100.00%> (ø)
... and 12 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 618aff4...a19a5e5. Read the comment docs.

@pagopa-github-bot
Copy link
Contributor

pagopa-github-bot commented Sep 21, 2020

Affected stories

  • 🌟 #174710415: Come CIT, dopo che i miei dati sono stati eliminati su mia richiesta, voglio ricevere un'email che mi avverte dell'avvenuta cancellazione

New dependencies added: html-to-text, nodemailer and nodemailer-sendgrid.

html-to-text

Author: Malte Legenhausen

Description: Advanced html to plain text converter

Homepage: https://github.com/werk85/node-html-to-text

Createdabout 8 years ago
Last Updatedabout 1 year ago
LicenseMIT
Maintainers1
Releases36
Direct Dependencieshe, htmlparser2, minimist and lodash
Keywordshtml, node, text, mail, plain and converter
This README is too long to show.

nodemailer

Author: Andris Reinman

Description: Easy as cake e-mail sending from your Node.js applications

Homepage: https://nodemailer.com/

Createdover 9 years ago
Last Updatedabout 2 months ago
LicenseMIT
Maintainers1
Releases231
Direct Dependencies
KeywordsNodemailer
README

Nodemailer

Nodemailer

Send e-mails from Node.js – easy as cake! 🍰✉️

NPM

See nodemailer.com for documentation and terms.

Having an issue?

First review the docs

Documentation for Nodemailer can be found at nodemailer.com.

Nodemailer throws a SyntaxError for "..."

You are using older Node.js version than v6.0. Upgrade Node.js to get support for the spread operator.

I'm having issues with Gmail

Gmail either works well or it does not work at all. It is probably easier to switch to an alternative service instead of fixing issues with Gmail. If Gmail does not work for you then don't use it. Read more about it here.

I get ETIMEDOUT errors

Check your firewall settings. Timeout usually occurs when you try to open a connection to a port that is firewalled either on the server or on your machine.

I get TLS errors

  • If you are running the code in your own machine, then check your antivirus settings. Antiviruses often mess around with email ports usage. Node.js might not recognize the MITM cert your antivirus is using.
  • Latest Node versions allow only TLS versions 1.2 and higher, some servers might still use TLS 1.1 or lower. Check Node.js docs how to get correct TLS support for your app.

I have a different problem

If you are having issues with Nodemailer, then the best way to find help would be Stack Overflow or revisit the docs.

License

Nodemailer is licensed under the MIT license


The Nodemailer logo was designed by Sven Kristjansen.

nodemailer-sendgrid

Author: Andris Reinman

Description: SendGrid transport object for Nodemailer.

Homepage: http://npmjs.com/package/nodemailer-sendgrid

Createdalmost 3 years ago
Last Updatedover 2 years ago
LicenseMIT
Maintainers1
Releases4
Direct Dependencies@sendgrid/mail
Keywordsnodemailer and sendgrid
README

nodemailer-sendgrid

SendGrid transport object for Nodemailer.

Warning, vendor lock-in ahead!

Using provider APIs like SendGrid might result in a vendor lock-in, especially if you are using provider specific features. So always consider if you would
prefer to use SMTP based services instead where vendor lock-ins do not happen.

Switching from a SMTP based provider to another is much easier (you do need to edit some DNS settings at least) than switching API based providers where you
probably have a lot of custom code targeting your existing provider.

This module is specially designed to be as much compatible with Nodemailer as possible, so if you do not touch the Sendgrid specific configuration options then
switching from SendGrid API to any other provider should be just as easy as switching from SMTP.

Usage

Requires Nodemailer v4.3.0+

This module is mostly meant to demonstrate the usage of mail.normalize(cb) method in Nodemailer v4.3. This allows creating HTTP API based transports for
Nodemailer much easier.

Install from NPM

npm install nodemailer nodemailer-sendgrid

Create Nodemailer transport

const nodemailer = require('nodemailer');
const nodemailerSendgrid = require('nodemailer-sendgrid');
const transport = nodemailer.createTransport(
    nodemailerSendgrid({
        apiKey: process.env.SENDGRID_API_KEY
    })
);

See full example.

Send a message

Message objects support the entire Nodemailer API. In addition you can provide SendGrid specific keys like templateId or sendAt.

transport.sendMail({
    from: 'sender@example.com',
    to: 'Receiver Name <receiver@example.com>, someother@example.com',
    subject: 'hello world',
    html: '<h1>Hello world!</h1>'
});

License

MIT

Generated by 🚫 dangerJS

utils/email.ts Outdated Show resolved Hide resolved
@gunzip gunzip self-requested a review September 22, 2020 08:53
@gunzip gunzip merged commit 9b363ab into master Sep 22, 2020
@gunzip gunzip deleted the 174710415-email-on-delete branch September 22, 2020 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants