ajanieniolasolomon / ng-sendgrid

An angular library for send grid

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NgSendgrid

This library allows you to quickly and easily use the SendGrid Web API v3 via Angular 2,4,6,7.

This library represents the beginning of a new path for SendGrid. We want this library to be community driven and SendGrid led. We need your help to realize this goal. To help make sure we are building the right things in the right order, we ask that you create issues and pull requests or simply upvote or comment on existing issues or pull requests.

Please browse the rest of this README for further detail.

We appreciate your continued support, thank you!


GitHub licenseBuild Status Maintenancesaythanks

npm i ngx-sendgrid

yarn install ngx-sendgrid

Usage

Import Main Module

import { SendgridModule,  SendgridService  } 
from 'ngx-sendgrid';




@NgModule({
 declarations: [
   //....
   ],
  imports: [
   //...
   SendgridModule.forRoot({token:'xxxxxxxxxxx'})
  ],
  })

Add to service

import { Injectable } from '@angular/core';
import { SendgridService } from 'ngx-sendgrid';

@Injectable({
providedIn: 'root'
})
export class AppService {

constructor(private service: SendgridService) { }

sendToSingleUser(){
this.service.BasicEmailToSingleUser( to, from, subject, content).subscribe(result=>{
console.log(result)
})

}

}




About

An angular library for send grid


Languages

Language:TypeScript 72.6%Language:JavaScript 17.5%Language:HTML 9.4%Language:CSS 0.5%