Giter VIP home page Giter VIP logo

Comments (7)

dan-ding avatar dan-ding commented on July 29, 2024

Can you provide more details to the issue?

from mailgun-ruby.

atinder avatar atinder commented on July 29, 2024

Tried this in my Gemfile
gem 'mailgun-ruby', '~>1.0.5', require: 'mailgun'
It didn't installed, tried following
gem 'mailgun-ruby', '~>1.0.2', require: 'mailgun'
It installed.

Mailgun.configure do |config|
  config.api_key = 'your-secret-key'
end

there are two api keys(private/public) in mailgun account, i guess above refers to the private key.

After this I can see ActionMailer is sending emails in the server logs but niether they are delivered nor I can see them in mailgun account logs.

Does it work with ActionMailer for rails or we need to use Mailgun::Client.new("your-api-key") every time we send emails ?

from mailgun-ruby.

lukebooth avatar lukebooth commented on July 29, 2024

For gem 'mailgun-ruby', '~>1.0.5', require: 'mailgun' part of your troubles, that was a mistake. There actually isn't a version 1.0.5 (see #51).

I think the term "secret-key" implies your private key, but if that isn't clear, maybe we can modify the readme.

After adding this gem, you'll actually be using the gem to send messages, not ActionMailer. With mailgun_rails gem, you set mailgun as the delivery handler for ActionMailer. mailgun-ruby is just to help you access Mailgun with plain ol' ruby and isn't intended to be an Rails plugin (but totally can be).

To use it in Rails a good setup would be to have a config file with your keys and an initializer to access those. Like this gist, that way you're not putting your secrets in your code.

from mailgun-ruby.

pirogoeth avatar pirogoeth commented on July 29, 2024

@atinder Are you still having this issue?

from mailgun-ruby.

atinder avatar atinder commented on July 29, 2024

yes, actually I was looking for more of Rails friendly gem. mailgun_rails seems to be solving my problem.

from mailgun-ruby.

pirogoeth avatar pirogoeth commented on July 29, 2024

Alright, glad you found something that works for you! I'll try to make this library more Rails friendly. Thanks for the comments!

from mailgun-ruby.

pirogoeth avatar pirogoeth commented on July 29, 2024

Going to use #14 in place of this issue.

from mailgun-ruby.

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.