Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

every email labled as "email is not valid in to" #40

Open
arximughal opened this issue Oct 21, 2024 · 0 comments
Open

every email labled as "email is not valid in to" #40

arximughal opened this issue Oct 21, 2024 · 0 comments

Comments

@arximughal
Copy link

I'm trying to configure this library to send out transactional emails. I have a template up in the account as well. But every single email that I try to send out, gives the same error (EVEN WITH DIFFERENT EMAIL ADDRESSES):

body: { code: 'invalid_parameter', message: 'email is not valid in to' },

Here's a snippet of the code:

sendSmtpEmail.to = [{ email: message.to }];
  sendSmtpEmail.params = message.params;
  sendSmtpEmail.templateId = message.templateId;
  sendSmtpEmail.replyTo = { email: '[email protected]', name: 'Example' };

  apiInstance.sendTransacEmail(sendSmtpEmail).then(
    (data) => {
      console.log(
        `API called successfully. Returned data: ${JSON.stringify(data)}`
      );
    },
    (error) => {
      console.error(error);
    }
  );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant