sofia.baltzi 2018-11-09 15:48:01 +00:00
parent 22d4a2f105
commit 80e22d6849
4 changed files with 37 additions and 0 deletions

8
utils/email/body.ts Normal file
View File

@ -0,0 +1,8 @@
export class Body {
salutation: string;
fromMessage: string;
fromName: string;
paragraphs: string;
closing: string
signature: string;
}

View File

@ -0,0 +1,22 @@
import {Injectable} from '@angular/core';
import {Http, Response, Headers, RequestOptions} from '@angular/http';
import {Email} from './email';
@Injectable()
export class EmailService {
constructor(private http:Http) {
}
sendEmail(url: string, email: Email) {
let headers = new Headers({'Content-Type': 'application/json'});
let options = new RequestOptions({headers: headers});
let body = JSON.stringify(email);
console.log(body);
return this.http.post(url, body, options)
.do(request => console.log("Insert Response:"+request.status));
}
}

5
utils/email/email.ts Normal file
View File

@ -0,0 +1,5 @@
export class Email {
body: string;
subject: string;
recipients: string[];
}

View File

@ -131,6 +131,8 @@ export class EnvProperties {
searchLinkToAdvancedOrganizations; searchLinkToAdvancedOrganizations;
searchLinkToAdvancedPeople; searchLinkToAdvancedPeople;
sendMailUrl;
lastIndexInformationLink; lastIndexInformationLink;
showLastIndexInformationLink; showLastIndexInformationLink;