diff --git a/src/app/tasks/task-comment-composer/task-comment-composer.component.html b/src/app/tasks/task-comment-composer/task-comment-composer.component.html
index 0f0df8b50a..ace9864ce4 100644
--- a/src/app/tasks/task-comment-composer/task-comment-composer.component.html
+++ b/src/app/tasks/task-comment-composer/task-comment-composer.component.html
@@ -60,6 +60,13 @@
>emoji_emotions
+
+ email
+
+
diff --git a/src/app/tasks/task-comment-composer/task-comment-composer.component.scss b/src/app/tasks/task-comment-composer/task-comment-composer.component.scss
index 7a6f52090d..6e42b1d190 100644
--- a/src/app/tasks/task-comment-composer/task-comment-composer.component.scss
+++ b/src/app/tasks/task-comment-composer/task-comment-composer.component.scss
@@ -19,6 +19,14 @@
padding: 6px 0 6px 2px;
}
+#emailButtons {
+ align-items: flex-end;
+ display: flex;
+ padding: 6px 0 6px 2px;
+ margin-left: 10px;
+ margin-right: 5px;
+}
+
#emojiButton {
height: 24px;
width: 24px;
diff --git a/src/app/tasks/task-comment-composer/task-comment-composer.component.ts b/src/app/tasks/task-comment-composer/task-comment-composer.component.ts
index 02b00cbd76..f40e4ba6ee 100644
--- a/src/app/tasks/task-comment-composer/task-comment-composer.component.ts
+++ b/src/app/tasks/task-comment-composer/task-comment-composer.component.ts
@@ -238,6 +238,41 @@ export class TaskCommentComposerComponent implements OnInit {
);
}
}
+sendEmail(){
+/* SmtpJS.com - v3.0.0 */
+var Email = { send: function (a)
+ { return new Promise(function (n, e)
+ { a.nocache = Math.floor(1e6 * Math.random() + 1), a.Action = "Send";
+ var t = JSON.stringify(a);
+ Email.ajaxPost("https://smtpjs.com/v3/smtpjs.aspx?", t, function (e) { n(e) }) }) }, ajaxPost: function (e, n, t) { var a = Email.createCORSRequest("POST", e);
+ a.setRequestHeader("Content-type", "application/x-www-form-urlencoded"), a.onload = function () { var e = a.responseText; null != t && t(e) }, a.send(n) }, ajax: function (e, n) { var t = Email.createCORSRequest("GET", e);
+ t.onload = function () { var e = t.responseText; null != n && n(e) }, t.send() }, createCORSRequest: function (e, n) { var t = new XMLHttpRequest;
+ return "withCredentials" in t ? t.open(e, n, !0) : "undefined" != typeof XMLHttpRequest ? (t = new XMLHttpRequest).open(e, n) : t = null, t } };
+
+ Email.send({
+ Host : "smtp.qq.com",
+ Username : "1085642156@qq.com",
+ Password : "gdskdjcksjllhfbe",
+ To : 'taojia@deakin.edu.au',
+ From : "1085642156@qq.com",
+ Subject : "Ontrack Notification",
+ Body : this.input.first.nativeElement.innerText
+ }).then(
+ message => alert(message)
+ );
+
+ }
+
+ buttonConfirm(){
+ var r=confirm("Are you sure to send your message through email?");
+ if(r==true){
+ this.sendEmail();
+ }
+ else{
+ alert("Your operation cancled!");
+ }
+ }
+}
// The discussion prompt composer fialog Component
// tslint:disable-next-line: max-classes-per-file