Using Sendgrid, Node.js and Firebase cloud functions, I was able to send emails via http. For the past few days my emails just weren't coming through anymore. I haven't really changed my code much so I have no idea whats causing the emails not to be sent. I checked my firebase function logs but I receive 200 or 204 status codes. When I check sendgrid it shows requests are being made and emails are being sent.

and yes, I checked my spam folder.

Can somebody please help?

Here's my function:

```
const functions = require("firebase-functions");
const admin = require("firebase-admin");
admin.initializeApp();
const cors = require("cors")({ origin: true });
const SENDGRID_API_KEY =
  "SENDGRID-APIKEY";
const sgMail = require("@sendgrid/mail");
sgMail.setApiKey(SENDGRID_API_KEY);

exports.httpManagerEmail = functions.https.onRequest((req, res) => {
  cors(req, res, () => {
    const toEmail = req.body.toEmail;
    const managerName = req.body.managerName;
    const managerEmail = req.body.managerEmail;
    const managerUUID = req.body.managerUUID;

    const msg = {
      to: toEmail,
      from: {
        email: "support@BLAH.com",
        name: "BLAH"
      },
      text: '',
      html: '',
      templateId: "d-111111111",
      substitutionWrappers: ["{{", "}}"],
      substitutions: {
        managerName: managerName,
        managerEmail: managerEmail,
        managerUUID: managerUUID
      }
    };
    return sgMail
      .send(msg)
      .then(() => res.status(200).send({ message: "email sent!" }))
      .catch(err => res.status(400).send(err));
  });
});

```

Here is my component.ts

```
endpoint = "MY_ENDPOINT"

  sendEmail() {
    const managerData = {
      toEmail: this.manager.managerEmail,
      managerName: this.manager.managerFirstName,
      managerEmail: this.manager.managerEmail,
      managerUUID: this.manager.managerUUID
    }
      this.httpClient.post(this.endpoint, managerData).subscribe(data => console.log('email sent: ', data));
    }

```

Thanks for taking the time to try and help!