title: Firebase Functions Typescript - Sending Emails with html templates
body: <p>I am trying to read html file with fs.readFile('../emailTemplates/template.html') from index.ts </p>
  
  <p>my folders : </p>
  
  <pre><code>--src
    --index.ts
    --UsersFunctions
      --UserFunctions.ts
    --emailTemplates
      --template.html
  </code></pre>
  
  <p>from index.ts :</p>
  
  <pre><code>import * as UsersFunctions from './UsersFunctions/UsersFunctions';
  export const newUserRegister = UsersFunctions.onCreateNewUser;
  </code></pre>
  
  <p>from UsersFunctions.ts</p>
  
  <pre><code> export const onCreateNewUser = functions.firestore.document('users/allUsers/usersData/{userId}').onCreate(async (snap, context) =&gt; {
    fs.readFile("../emailTemplates/template.html", {encoding: 'utf-8'}, (err, html) =&gt; {
      if (err) {
          console.log(err);
  
      }
      else {
  
      }
    });       
   }
  </code></pre>
  
  <p>i am getting an error from firebase functions : </p>
  
  <pre><code>Error: ENOENT: no such file or directory, open '../emailTemplates/template.html'
  at Error (native)
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: 'user_code/lib/emailTemplates/newUserRegisterHtmlTemplate.html'
  </code></pre>
  
  <p>I just want to send an email with html template 
  maybe there is another way to do it ? 
  i tired to search but found nothing regarding email templates with frirebase functions with typescript </p>