Skip to content

EmailJSResponseStatus: Uncaught TypeError: Cannot read properties of null (reading 'status') #39

Closed
@mauriciorj

Description

@mauriciorj

I'm using the @emailjs/browse (3.7.0) with react (17.0.2) + typescript (4.6.2).

After I sent an email I'm receiving this error message:

Screen Shot 2022-10-31 at 11 19 59 PM

Screen Shot 2022-10-31 at 11 20 26 PM

The weird part is: the email is being sent!
But my function is not returning either the response or error.

  • I also tried the rest API, but there is another error similar to this one -> #37

const msg = { firstName: values.firstName, email: values.email, message: values.text, subject: values.subject, };


export const SendEmail = (msg) => {
    emailjs
      .send(
        process.env.REACT_APP_SERVICE_ID,
        process.env.REACT_APP_TEMPLATE_ID,
        msg,
        process.env.REACT_APP_PUBLIC_KEY
      )
      .then(
        (response) => {
          console.log(response);
          return response;
        },
        (error) => {
          console.log(error);
          return error;
        }
      );
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions