Skip to content
Snippets Groups Projects
Commit 4cbc2104 authored by Odin K. Henriksen's avatar Odin K. Henriksen
Browse files

Commenting and removal of prints.

parent 1a31e98a
No related branches found
No related tags found
No related merge requests found
......@@ -13,11 +13,12 @@ import (
//Function linked to the escalation to manual analysis button in the frontend. Function sends email to user whom requested manual analysis.
//Function utlizes the gomail package.
//This function has been created with inspiration from https://www.loginradius.com/blog/engineering/sending-emails-with-golang/.
func EscalateAnalysis(url string, result string, token string, hash string) {
email_pwd := os.Getenv("email_pwd")
email_pwd := os.Getenv("email_pwd") //Get service password from ENV.
from := "threattotalv2@gmail.com"
from := "threattotalv2@gmail.com" //Address to send email from.
to := getUserEmail(token) //Gets the email of the user.
......@@ -52,6 +53,7 @@ func EscalateAnalysis(url string, result string, token string, hash string) {
// Now send E-Mail
if err := d.DialAndSend(m); err != nil {
fmt.Println(err)
logging.Logerror(err, "Error sending email - EscalateManualAnalysis.")
}
}
......@@ -71,6 +73,7 @@ func getUserEmail(hash string) (email string) {
responseBytes, err := json.Marshal(value) //Marshal data
if err != nil {
fmt.Println(err)
logging.Logerror(err, "Error marshalling data")
}
var test []byte
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment