import { from , map , Observable } from 'rxjs' ; import { gmail_v1 } from 'googleapis' ; import { createEmail } from './gmail-email-create.functions' ; export const sendGmailEmail = ( gmail , senderEmail , recipientEmail , subject , message ) : Observable < void > => { return from ( gmail . users . messages . send ( { userId : 'me' , requestBody : { raw : createEmail ( senderEmail , recipientEmail , subject , message ) , } , } ) ) . pipe ( map ( ( ) => undefined ) ) ; } ;