Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
simcaq-node
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Harbor Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
simcaq
simcaq-node
Commits
d3e9473a
Commit
d3e9473a
authored
3 years ago
by
Pietro Cavassin
Browse files
Options
Downloads
Patches
Plain Diff
Fix Email send
parent
f6e251ef
No related branches found
No related tags found
1 merge request
!309
Merge new updates into master
Pipeline
#27262
failed
3 years ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
config.json.example
+3
-3
3 additions, 3 deletions
config.json.example
src/libs/middlewares/email.js
+5
-13
5 additions, 13 deletions
src/libs/middlewares/email.js
with
8 additions
and
16 deletions
config.json.example
+
3
−
3
View file @
d3e9473a
...
...
@@ -38,7 +38,7 @@
"host": "mx.c3sl.ufpr.br",
"secure": false,
"ignoreTLS": true,
"from": "\"Laboratório de Dados Educacionais\" <
lde
@c3sl.ufpr.br>"
"from": "\"Laboratório de Dados Educacionais\" <
simcaq
@c3sl.ufpr.br>"
},
"security": {
"tokenLife": 3600
...
...
@@ -84,7 +84,7 @@
"host": "mx.c3sl.ufpr.br",
"secure": false,
"ignoreTLS": true,
"from": "\"Laboratório de Dados Educacionais\" <
lde
@c3sl.ufpr.br>"
"from": "\"Laboratório de Dados Educacionais\" <
simcaq
@c3sl.ufpr.br>"
},
"security": {
"tokenLife": 3600
...
...
@@ -130,7 +130,7 @@
"host": "mx.c3sl.ufpr.br",
"secure": false,
"ignoreTLS": true,
"from": "\"Laboratório de Dados Educacionais\" <
lde
@c3sl.ufpr.br>"
"from": "\"Laboratório de Dados Educacionais\" <
simcaq
@c3sl.ufpr.br>"
},
"security": {
"tokenLife": 3600
...
...
This diff is collapsed.
Click to expand it.
src/libs/middlewares/email.js
+
5
−
13
View file @
d3e9473a
...
...
@@ -4,19 +4,11 @@ const config = require(`${libs}/config`);
const
nodemailer
=
require
(
'
nodemailer
'
);
const
htmlToText
=
require
(
'
nodemailer-html-to-text
'
).
htmlToText
;
// let transporter = nodemailer.createTransport({
// host: config.email.host,
// port: config.email.port,
// secure: config.email.secure,
// ignoreTLS: config.email.ignoreTLS
// });
let
transporter
=
nodemailer
.
createTransport
({
host
:
"
smtp.inf.ufpr.br
"
,
port
:
587
,
secure
:
false
,
ignoreTLS
:
false
,
tls
:
{
rejectUnauthorized
:
false
}
host
:
config
.
email
.
host
,
port
:
config
.
email
.
port
,
secure
:
config
.
email
.
secure
,
ignoreTLS
:
config
.
email
.
ignoreTLS
});
transporter
.
use
(
'
compile
'
,
htmlToText
());
...
...
@@ -43,4 +35,4 @@ module.exports = function send(options, cb) {
}
cb
(
null
,
info
);
});
};
\ No newline at end of file
};
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment