Skip to content

Commit

Permalink
Rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
lacostej committed Feb 27, 2024
1 parent a927d97 commit b3b5a0b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions fastlane/lib/fastlane/actions/mailgun.rb
Original file line number Diff line number Diff line change
Expand Up @@ -137,19 +137,18 @@ def self.mailgunit(options)
params.store(:attachment, attachments)
end

puts params.to_json
conn = Faraday.new(url: "https://api:#{options[:apikey]}@api.mailgun.net") do |f|
f.request :multipart
f.request :url_encoded
f.adapter :net_http
f.request(:multipart)
f.request(:url_encoded)
f.adapter(:net_http)
end
response = conn.post("/v3/#{sandbox_domain}/messages", params)
UI.user_error!("Failed to send message via Mailgun, response: #{response.status}: #{response.body}.") if response.status != 200
mail_template(options)
end

def self.mime_for(path)
mime = MIME::Types.type_for path
mime = MIME::Types.type_for(path)
mime.empty? ? 'text/plain' : mime[0].content_type
end

Expand Down

0 comments on commit b3b5a0b

Please sign in to comment.