Git Product home page Git Product logo

mailersend-ruby's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mailersend-ruby's Issues

Add missing parameters to Domains endpoints

We added two parameters for our domains: ignore duplicated recipients and add a precedence bulk header. Both of these parameters have to be added to our related Domains endpoints.

  • Add the ignore_duplicated_recipients and the precedence_bulk parameters to the Get a list of domains endpoint.
  • Add the ignore_duplicated_recipients and the precedence_bulk parameters to the Get a single domain endpoint.
  • Add the ignore_duplicated_recipients and the precedence_bulk parameters to the Add a domain endpoint.
  • Add the ignore_duplicated_recipients and the precedence_bulk parameters to the Update domain settings endpoint.

Configurable `API_TOKEN`

Expected behavior

Makes the API_TOKEN configurable through config file, hence the env variable name can be anything

Actual behavior

The only way to set the token now is through env variable, which might clash with another environment variable with the same name

Tags not being added in template emails

There is the add_tags method in the MailerSend::Email class but it does not seem to add tags to the email.

If you take the readme example code and add:

...
ms_email.add_tags('test-tag')

# Send the email
ms_email.send

It will not add a tag to the email.

Thanks!

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

bundler
Gemfile
  • bundler '~> 2.4.22'
  • rake '~> 13.0'
  • rubocop '~> 1.7'
github-actions
.github/workflows/main.yml
  • actions/checkout v4
  • actions/setup-ruby v1
.github/workflows/publish_gem.yml
  • actions/checkout v4
  • actions/setup-ruby v1

  • Check this box to trigger a request for Renovate to run again on this repository

Add the priority parameter to the inbound route endpoints

We have a new parameter called "inbound_priority" on our Inbound Routes. This parameter allows our users to create multiple inbound routes per inbound subdomain. Each one of the routes will be processed in a descending order. Values can be between 0 and 100. 0 has more importance than 100.

`dotenv/load` doesn't load `.env.local`

Dotenv by default will look for a hierarchy of files, but using dotenv/load drops that to only look for .env.

Our app uses .env.local for dev machine environment variables that probably shouldn't be committed, but this doesn't get loaded if we're using mailersend-ruby. Is there a way to avoid the dotenv/load call somehow?

Getting NameError due to uninitialized variable

The local variable response is not initialized in lib/mailersend/sender_identity/sender_identity.rb prior to being used in the last line of the list method:

    def list(domain_id: nil, page: nil, limit: nil)
      hash = {
        'domain_id' => domain_id,
        'page' => page,
        'limit' => limit
      }
      client.http.get(URI::HTTPS.build(host: API_BASE_HOST, path: '/v1/identities',
                                       query: URI.encode_www_form(hash.compact)))
      puts response
    end

This results in Mailersend::SenderIdentity.new.list throwing a NameError.

irb(main):014:0> Mailersend::SenderIdentity.new.list
Traceback (most recent call last):
        1: from (irb):14
NameError (undefined local variable or method `response' for #<Mailersend::SenderIdentity:0x0000aaaaf9ffe7c8>)
Did you mean?  respond_to?

Looks like the last line of the method, puts response, may have been from dev work and just needs to be removed to resolve this.

Text and HTML should be defaulted to null-like value, not an empty object/or array

@text = {}
@html = {}

I do think that these lines can be interpreted by Ruby and sent through JSON to our API as an empty object or array. And in a case where a template_id is provided, and it has default settings, these are not required and are introducing an error.

This theory should be tested, however.

This is an example that breaks on the API side:

Screenshot 2021-08-02 at 10 58 38

Inadequate documentation for reply_to feature in sending mails

The documentation at https://developers.mailersend.com/api/v1/email.html#send-an-email does not specify any Limitations or details for the reply_to attribute while sending an email. After testing the ruby sdk multiple times, I think that the reply_to field only takes one value at a time, and on sending multiple values, it keeps on overwriting the previous value. This should be mentioned in the documentation I feel. I am ready to contribute in this way, since I also use the mailersend ruby sdk on a daily basis, but I couldn't find the documentation repository.

Update the activity pagination method

We recently changed activity fetch in our app so the pagination wasnโ€™t working anymore for the API, could you update the Activity endpoint to match the most recent update?

Searching for sender identities with email and domain

I see the SenderIdentity#single_by_email method available albeit I didn't see it in the docs for this Ruby gem.

I have a use case where I may have the same email with two sender identities for two different signed/verified domains and I need to search by both email and domain_id to get the correct identity_id. Since the dataset is small, I can perform a linear search against the output of SenderIdentity#list, but this isn't a good long term solution.

Is there another endpoint where I can search by both email and domain_id? Or, if not, would it be possible to modify this method's target endpoint to include email and domain_id optionally?

    def single_by_email(email:)
      hash = {
        'email' => email
      }
      client.http.get(URI::HTTPS.build(host: API_BASE_HOST, path: "/v1/identities/email/#{email}",
                                       query: URI.encode_www_form(hash.compact)))
    end

As another option, maybe it would be possible to add a separate method, multiple_by_email or something to return an array of any with the email and then I can perform a search against the reduced data set.

Create the Email verification endpoints

  • Get all email verification lists
  • Get an email verification list
  • Create an email verification list
  • Verify an email list
  • Get email verification list results

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.