Class: Ish::EmailTemplate

Inherits:
Object
  • Object
show all
Includes:
Mongoid::Document, Mongoid::Timestamps
Defined in:
lib/ish/email_template.rb

Constant Summary collapse

LAYOUTS =
%w| plain
m20221201react m20221222merryxmas
m202309_feedback
m202309_ror4
marketing_node_1
marketing_react_1 marketing_react_2 marketing_react_3
marketing_ror_1 marketing_ror_2
marketing_wordpres_1 marketing_wordpress_2
piousbox_roundborders
plain
tracking_footer
wasyaco_roundborders |
DEFAULT_FROM_EMAIL =
'Victor Pudeyev <[email protected]>'
FROM_EMAILS =
[
  'Annesque Studio <[email protected]>',
  'Annesque Studio <[email protected]>',

  'BJJCollective <[email protected]>',
  'BJJCollective <[email protected]>',

  'DemmiTV <[email protected]>',
  'DemmiTV <[email protected]>',

  'Infinite Shelter <[email protected]>',
  'Infinite Shelter <[email protected]>',

  'Oquaney Splicing <[email protected]>',
  'Oquaney Splicing <[email protected]>',

  'Victor Pudeyev <[email protected]>',
  'Victor Pudeyev <[email protected]>',
  'Victor Pudeyev <[email protected]>',
  'Victor Pudeyev <[email protected]>',

  'Sender SBS <[email protected]>',
  'Sender SBS <[email protected]>',

  'WasyaCo Consulting <[email protected]>',
  'Alex WCo <[email protected]>',
  'Bailey WCo <[email protected]>',
  'Cameron WCo <[email protected]>',
  'WasyaCo Consulting <[email protected]>',
  'Jess WCo <[email protected]>',
  'WasyaCo Consulting <[email protected]>',
  'Victor Pudeyev <[email protected]>',

  'WasyaCo Consulting <[email protected]>',
  'Alex WCo <[email protected]>',
  'Bailey WCo <[email protected]>',
  'Cameron WCo <[email protected]>',
  'WasyaCo Consulting <[email protected]>',
  'WasyaCo Consulting <[email protected]>',
  'Victor Pudeyev <[email protected]>',

  'Wasya Co Mailer <[email protected]>',
  'Wasya Co Mailer <[email protected]>',
]
SIGNATURE =
"<div>\n<div><br></div>\n<div>Regards,</div>\n<div>-=----- &gt;8 --</div>\n<div>Victor Pudeyev<br>Director of Engineering<br><a href=\"mailto:[email protected]\" target=\"_blank\">[email protected]</a> | <a href=\"https://tidycal.com/wasya-co/30min\" target=\"_blank\">Book a chat</a><br></div>\n</div><hr /><br /><br /><br />\n"
SLUG_BLANK =
'blank'

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.blankObject



106
# File 'lib/ish/email_template.rb', line 106

def self.blank; self.blank_template; end

.blank_templateObject



103
104
105
# File 'lib/ish/email_template.rb', line 103

def self.blank_template
  out = Tmpl.find_or_create_by({ slug: SLUG_BLANK })
end

.from_email_listObject



78
79
80
# File 'lib/ish/email_template.rb', line 78

def self.from_email_list
  [ [nil, nil] ] + FROM_EMAILS.map { |i| [i, i] }
end

Instance Method Details

#config_exeObject

unused! vp 2023-09-24



29
# File 'lib/ish/email_template.rb', line 29

field :config_exe,                      default: ""

#get_bindingObject

2023-03-04 vp This works!



92
93
94
95
# File 'lib/ish/email_template.rb', line 92

def get_binding
  @lead = Lead.where( email: '[email protected]' ).first
  binding()
end

#to_sObject



108
109
110
# File 'lib/ish/email_template.rb', line 108

def to_s
  "Tmpl:#{slug}"
end