skykkm0810 / forme

0 stars 0 forks source link

smtp.js 사용시 window.Email.send 부분 에러 #23

Open skykkm0810 opened 1 year ago

skykkm0810 commented 1 year ago

smtp.js 사용시 Email 부분 오류

window.Email.send({
      SecureToken: "1111-1111-111-111",
      To: "google.com",
      From: "google.com",
      Subject: `${name}, ${contact}, ${email}`,
      Body: desc,
    }).then((rst: any) => console.log(rst));
  };

Property 'Email' does not exist on type 'Window & typeof globalThis'.ts(2339)

해당 에러 해결 방법

    //@ts-ignore
    window.Email.send({
      SecureToken: "1111-1111-111-111",
      To: "google.com",
      From: "google.com",
      Subject: `${name}, ${contact}, ${email}`,
      Body: desc,
    }).then((rst: any) => console.log(rst));
  };

//@ts-ignore 사용 https://velog.io/@yoon-bomi/ts-expect-error-%EC%99%80-ts-ignore-%EC%9D%80-%EC%96%B8%EC%A0%9C-%EC%82%AC%EC%9A%A9%ED%95%B4%EC%95%BC%ED%95%A0%EA%B9%8C