0.0
No release in over 3 years
Low commit activity in last 3 years
Maxemails API wrapped in a gem
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 3.3.0
 Project Readme

Maxemail gem 💌

Please view the API Doc's and read the source code for other usages of this gem:

Installation

In your gemfile

gem 'maxemail_api'

In your .env file:

MAXEMAIL_USERNAME=techadmin@mumsnet.com
MAXEMAIL_PASSWORD=123456
MAXEMAIL_API_URL=https://maxemail.emailcenteruk.com/api/json/

Usage

Sending a trigged mail:

 def send_triggered
   profile_data = JSON.parse(params[:profile_data])
   email_address = ENV['DEV_EMAIL_ADDRESS'].nil? ? params[:email_address] : ENV['DEV_EMAIL_ADDRESS']
   response = MaxemailApi.send(folder_name: params[:folder_name], email_name: params[:email_name], email_id: params[:email_id], email_address: email_address, profile_data: profile_data)
   render json: response.to_json
 end

Update prefrences (Subscriptions):

def update_subscriptions(email_address:, params:)
 MaxemailApi.update_recipient(email_address: email_address, data: { Preferences: params }.to_json)
end