Giter VIP home page Giter VIP logo

Comments (15)

aydrian avatar aydrian commented on August 11, 2024 1

If he removed it from his account, I would inform support.

from notifme-sdk.

BDav24 avatar BDav24 commented on August 11, 2024

Yes sure, I think the best way is to call SparkPost api without using the nodemailer transport.

You can check Nexmo provider, which also calls an api: https://github.com/notifme/notifme-sdk/search?utf8=%E2%9C%93&q=nexmo&type=

Let me know if you need more information.

from notifme-sdk.

BDav24 avatar BDav24 commented on August 11, 2024

@aydrian SparkPost API is integrated :)

Note: 5 emails by day in sandbox mode to test is a bit short...

from notifme-sdk.

aydrian avatar aydrian commented on August 11, 2024

Thank you. Yes. It's short by design. The deliverability of those emails are not great and were being abused by spammers. Once you create a sending domain, you can send 15K per month for free.

from notifme-sdk.

BDav24 avatar BDav24 commented on August 11, 2024

@aydrian I'm unsure about cc and bcc in your code, it's not passed the same way in the documentation (https://www.sparkpost.com/docs/faq/cc-bcc-with-rest-api/), can you confirm that it's working this way?
https://github.com/notifme/notifme-sdk/blob/master/src/providers/email/sparkpost.js#L44-L45

from notifme-sdk.

aydrian avatar aydrian commented on August 11, 2024

The node library has sugar methods to make passing cc & bcc easier. Let me double check.

from notifme-sdk.

aydrian avatar aydrian commented on August 11, 2024

Sorry. I'll do a PR to fix those. I need to pass them in an array.

from notifme-sdk.

BDav24 avatar BDav24 commented on August 11, 2024

It's my mistake in fact, I didn't see that the lib was transforming these fields.
I'm changing their type to make things clearer:

export type EmailRequestType = CommonRequestType & {
  ...
  cc?: string[],
  bcc?: string[],
  ...
}

from notifme-sdk.

BDav24 avatar BDav24 commented on August 11, 2024

I can handle the change, it doesn't seem to be a big change. One question though: if I have multiple cc, is that the right syntax?

  "content": {
    "from": "[email protected]",
    "headers": {
      "CC": "[email protected], [email protected], [email protected]"
    },
    "subject": "To and CC",
    "text": "This mail was sent to [email protected] while CCing [email protected]."
  }

from notifme-sdk.

aydrian avatar aydrian commented on August 11, 2024

Here's an example with the sugar. I would just use that, then it's just an array of objects and the lib will transform it for you.
The header is only part of it. You also need them in the recipients with the header_to property set. Here's an example.

from notifme-sdk.

BDav24 avatar BDav24 commented on August 11, 2024

I removed the lib dependency, that's why I need to rewrite "the sugar". So:

  • for cc and bcc: for each email I add an object in recipients containing address.email (cc or bcc address) and address.header_to (original recipient)
  • for cc only, I add content.headers.CC (comma separated values)

Is this right?

(Edited: switched email and header_to)

from notifme-sdk.

aydrian avatar aydrian commented on August 11, 2024

Yes. The lib is a thin wrapper so the structure would be the same as the second example.

from notifme-sdk.

BDav24 avatar BDav24 commented on August 11, 2024

verifying your domain: Status Blocked

:/

from notifme-sdk.

aydrian avatar aydrian commented on August 11, 2024

Awe... It looks like your domain is already in use in another account. Do you have multiple SparkPost accounts?

from notifme-sdk.

BDav24 avatar BDav24 commented on August 11, 2024

It seems that @jnoleau added the domain on his test account, it should be alright now. Should I contact support or you can take care of it?

from notifme-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.