Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export class EmailService {
- constructor(private http: HttpClient) {}
- sendMailgunMessage() {
- const options = {
- headers: new HttpHeaders({
- 'Content-Type': 'application/x-www-form-urlencoded'
- })
- };
- const body = {
- username: 'api',
- password: 'key-xxx',
- from: '<hello@app.xxx.com>',
- to: 'xxx@xxx.com',
- subject: 'Subject text',
- text: 'Body text',
- multipart: true
- };
- return this.http.post('https://api.mailgun.net/v3/app.xxx.com/messages', body, options);
- }
- }
Add Comment
Please, Sign In to add comment