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

bcc doesnt work. #32

Closed
mharithzahid opened this issue Jan 26, 2022 · 1 comment
Closed

bcc doesnt work. #32

mharithzahid opened this issue Jan 26, 2022 · 1 comment
Assignees

Comments

@mharithzahid
Copy link

I've follow the code sample below from your docs

const Recipient = require("mailersend").Recipient;
const EmailParams = require("mailersend").EmailParams;
const MailerSend = require("mailersend");

const mailersend = new MailerSend({
    api_key: "key",
});

const recipients = [
  new Recipient("your@client.com", "Your Client")
];
const cc = [
  new Recipient("your_cc@client.com", "Your CC Client")
];
const bcc = [
  new Recipient("your_bcc@client.com", "Your BCC Client")
];

const emailParams = new EmailParams()
      .setFrom("your@domain.com")
      .setFromName("Your Name")
      .setRecipients(recipients)
      .setCc(cc)
      .setBcc(bcc)
      .setSubject("Subject")
      .setHtml("This is the HTML content")
      .setText("This is the text content");

mailersend.send(emailParams);

The error

[0]   [Symbol(Response internals)]: {
[0]     url: 'https://api.mailersend.com/v1/email',

[0]     status: 422,
[0]     statusText: 'Unprocessable Content',
[0]     headers: Headers { [Symbol(map)]: [Object: null prototype] },
[0]     counter: 0
[0]   }
@opheus2
Copy link
Contributor

opheus2 commented Sep 5, 2022

This issue isn't reproducible. Please ensure to check that you are not passing an existing recipient's email in either your CC or BCC

@opheus2 opheus2 closed this as completed Sep 5, 2022
@opheus2 opheus2 self-assigned this Sep 11, 2022
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

2 participants