wco_email 0.1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.txt +129 -0
- data/Rakefile +5 -0
- data/app/assets/config/wco_email_manifest.js +7 -0
- data/app/assets/javascript/vendor-trash/jquery-ui.min.js +13 -0
- data/app/assets/javascript/vendor-trash/jquery.fileupload.js +1482 -0
- data/app/assets/javascript/vendor-trash/jquery.iframe-transport.js +224 -0
- data/app/assets/javascript/vendor-trash/jquery.ui.widget.js +572 -0
- data/app/assets/javascript/vendor-trash/summernote-bs4.min.js +3 -0
- data/app/assets/javascript/wco_email/application.js +11 -0
- data/app/assets/javascript/wco_email/contexts.js +19 -0
- data/app/assets/javascript/wco_email/conversations.js +177 -0
- data/app/assets/javascript/wco_email/file_upload.js-trash +32 -0
- data/app/assets/javascript/wco_email/shared.js +22 -0
- data/app/assets/stylesheets/wco_email/application.scss +29 -0
- data/app/assets/stylesheets/wco_email/contexts.scss +63 -0
- data/app/assets/stylesheets/wco_email/conversations.scss +16 -0
- data/app/assets/stylesheets/wco_email/tags.scss +6 -0
- data/app/controllers/wco_email/application_controller.rb +16 -0
- data/app/controllers/wco_email/contexts_controller.rb +156 -0
- data/app/controllers/wco_email/conversations_controller.rb +129 -0
- data/app/controllers/wco_email/email_action_templates_controller.rb +77 -0
- data/app/controllers/wco_email/email_actions_controller.rb +55 -0
- data/app/controllers/wco_email/email_campaigns_controller.rb +73 -0
- data/app/controllers/wco_email/email_filters_controller.rb +72 -0
- data/app/controllers/wco_email/email_layouts_controller.rb +13 -0
- data/app/controllers/wco_email/email_templates_controller.rb +124 -0
- data/app/controllers/wco_email/message_stubs_controller.rb +14 -0
- data/app/controllers/wco_email/messages_controller.rb +28 -0
- data/app/controllers/wco_email/obfuscated_redirects_controller.rb +20 -0
- data/app/controllers/wco_email/sessions_controller.rb +19 -0
- data/app/controllers/wco_email/unsubscribes_controller.rb +40 -0
- data/app/helpers/wco_email/application_helper.rb +20 -0
- data/app/jobs/wco_email/message_intake_job.rb +54 -0
- data/app/mailers/wco_email/application_mailer.rb +98 -0
- data/app/views/202212 Mailchimp Templates/202212 1col fixed-width.html +863 -0
- data/app/views/202212 Mailchimp Templates/202212 1col full-width.html +906 -0
- data/app/views/202212 Mailchimp Templates/202212 2col fixed-width 2.html +1003 -0
- data/app/views/202212 Mailchimp Templates/202212 2col fixed-width.html +1082 -0
- data/app/views/202212 Mailchimp Templates/202212 2col full-width 2.html +1053 -0
- data/app/views/202212 Mailchimp Templates/202212 2col full-width.html +1147 -0
- data/app/views/202212 Mailchimp Templates/202212 3col fixed-width.html +1087 -0
- data/app/views/202212 Mailchimp Templates/202212 3col full-width.html +1136 -0
- data/app/views/202212 Mailchimp Templates/202212 catalog various-colors-1.html +1223 -0
- data/app/views/202212 Mailchimp Templates/202212 educate.html +1080 -0
- data/app/views/202212 Mailchimp Templates/202212 follow up.html +1001 -0
- data/app/views/202212 Mailchimp Templates/202212 make an announcement.html +1048 -0
- data/app/views/202212 Mailchimp Templates/202212 sell-a-product.html +977 -0
- data/app/views/202212 Mailchimp Templates/202212 tell a story.html +1168 -0
- data/app/views/202212 Mailchimp Templates/202212 theme art-newsletter.html +1612 -0
- data/app/views/202212 Mailchimp Templates/202212 theme caribou-xmas.html +856 -0
- data/app/views/202212 Mailchimp Templates/202212 theme colorbox.html +1027 -0
- data/app/views/202212 Mailchimp Templates/202212 theme competition-invitation.html +918 -0
- data/app/views/202212 Mailchimp Templates/202212 theme event-veerle.html +1132 -0
- data/app/views/202212 Mailchimp Templates/202212 theme fall-colors.html +1407 -0
- data/app/views/202212 Mailchimp Templates/202212 theme gift-giving.html +787 -0
- data/app/views/202212 Mailchimp Templates/202212 theme giftgiving-snowmen.html +731 -0
- data/app/views/202212 Mailchimp Templates/202212 theme heart-of-flowers.html +795 -0
- data/app/views/202212 Mailchimp Templates/202212 theme hero-card.html +915 -0
- data/app/views/202212 Mailchimp Templates/202212 theme hero-image.html +1148 -0
- data/app/views/202212 Mailchimp Templates/202212 theme monthly-contest.html +967 -0
- data/app/views/202212 Mailchimp Templates/202212 theme multiple-event.html +1189 -0
- data/app/views/202212 Mailchimp Templates/202212 theme postcard.html +914 -0
- data/app/views/202212 Mailchimp Templates/202212 theme snowy-fields.html +733 -0
- data/app/views/202212 Mailchimp Templates/202212 theme soft.html +849 -0
- data/app/views/202212 Mailchimp Templates/202212 theme sophisticated.html +1079 -0
- data/app/views/202212 Mailchimp Templates/202212 theme subtle.html +1218 -0
- data/app/views/202212 Mailchimp Templates/202212 theme ticket.html +1015 -0
- data/app/views/202212 Mailchimp Templates/202212 theme whale.html +888 -0
- data/app/views/202310 Email Templates/_acknowledgement_of_document_receipt.html.erb +23 -0
- data/app/views/202310 Email Templates/_support_ticket_created.html.erb +26 -0
- data/app/views/layouts/wco_email/application.haml +64 -0
- data/app/views/layouts/wco_email/mailbox.haml-trash +62 -0
- data/app/views/wco_email/_analytics.erb +16 -0
- data/app/views/wco_email/_main_header.haml +31 -0
- data/app/views/wco_email/_sidebar.haml +10 -0
- data/app/views/wco_email/application_mailer/_footer_unsubscribe.html.erb +24 -0
- data/app/views/wco_email/application_mailer/_header_logo.html.erb +12 -0
- data/app/views/wco_email/application_mailer/forwarder_notify.html.erb +17 -0
- data/app/views/wco_email/contexts/_form.haml +59 -0
- data/app/views/wco_email/contexts/_form_reply.haml +27 -0
- data/app/views/wco_email/contexts/_header.haml +22 -0
- data/app/views/wco_email/contexts/_index.haml +8 -0
- data/app/views/wco_email/contexts/edit.haml +8 -0
- data/app/views/wco_email/contexts/iframe_src.haml +3 -0
- data/app/views/wco_email/contexts/index.haml +51 -0
- data/app/views/wco_email/contexts/new.haml +5 -0
- data/app/views/wco_email/contexts/show.haml +34 -0
- data/app/views/wco_email/contexts/summary.csv.erb +4 -0
- data/app/views/wco_email/contexts/summary.haml +16 -0
- data/app/views/wco_email/conversations/_actions.haml +21 -0
- data/app/views/wco_email/conversations/_search.haml +14 -0
- data/app/views/wco_email/conversations/index.haml +43 -0
- data/app/views/wco_email/conversations/show.haml +27 -0
- data/app/views/wco_email/email_action_templates/_form.haml +45 -0
- data/app/views/wco_email/email_action_templates/_header.haml +8 -0
- data/app/views/wco_email/email_action_templates/edit.haml +7 -0
- data/app/views/wco_email/email_action_templates/index.haml +36 -0
- data/app/views/wco_email/email_action_templates/new.haml +9 -0
- data/app/views/wco_email/email_action_templates/show.haml +11 -0
- data/app/views/wco_email/email_actions/_form.haml +24 -0
- data/app/views/wco_email/email_actions/_form_mini.haml-trash +28 -0
- data/app/views/wco_email/email_actions/_header.haml +8 -0
- data/app/views/wco_email/email_actions/edit.haml +4 -0
- data/app/views/wco_email/email_actions/index.haml +31 -0
- data/app/views/wco_email/email_actions/new.haml +4 -0
- data/app/views/wco_email/email_actions/show.haml +0 -0
- data/app/views/wco_email/email_campaigns/_form.haml +33 -0
- data/app/views/wco_email/email_campaigns/_header.haml +5 -0
- data/app/views/wco_email/email_campaigns/edit.haml +5 -0
- data/app/views/wco_email/email_campaigns/index.haml +14 -0
- data/app/views/wco_email/email_campaigns/new.haml +5 -0
- data/app/views/wco_email/email_campaigns/show.haml +17 -0
- data/app/views/wco_email/email_filters/_form.haml +40 -0
- data/app/views/wco_email/email_filters/_header.haml +5 -0
- data/app/views/wco_email/email_filters/edit.haml +5 -0
- data/app/views/wco_email/email_filters/index.haml +48 -0
- data/app/views/wco_email/email_filters/new.haml +5 -0
- data/app/views/wco_email/email_templates/_form.haml +48 -0
- data/app/views/wco_email/email_templates/_form_mini.haml +9 -0
- data/app/views/wco_email/email_templates/_form_reply_mini.haml +8 -0
- data/app/views/wco_email/email_templates/_form_schedule_mini.haml +11 -0
- data/app/views/wco_email/email_templates/_header.haml +6 -0
- data/app/views/wco_email/email_templates/_index.haml +26 -0
- data/app/views/wco_email/email_templates/_index_expanded.haml +13 -0
- data/app/views/wco_email/email_templates/_m20221201react.html.erb +1202 -0
- data/app/views/wco_email/email_templates/_m20221222merryxmas.html.erb +766 -0
- data/app/views/wco_email/email_templates/_m202309_feedback.html.erb +1161 -0
- data/app/views/wco_email/email_templates/_m202309_ror4.html.erb +1068 -0
- data/app/views/wco_email/email_templates/_marketing_node_1.html.erb +984 -0
- data/app/views/wco_email/email_templates/_marketing_react_1.html +0 -0
- data/app/views/wco_email/email_templates/_marketing_react_2.html.erb +749 -0
- data/app/views/wco_email/email_templates/_marketing_react_3.html.erb +628 -0
- data/app/views/wco_email/email_templates/_marketing_ror_1.html +751 -0
- data/app/views/wco_email/email_templates/_marketing_ror_2.html.erb +755 -0
- data/app/views/wco_email/email_templates/_marketing_ror_3.html.erb +25 -0
- data/app/views/wco_email/email_templates/_marketing_ror_4.html.erb +25 -0
- data/app/views/wco_email/email_templates/_marketing_ror_5.html.erb +17 -0
- data/app/views/wco_email/email_templates/_marketing_wordpress_1.html +0 -0
- data/app/views/wco_email/email_templates/_marketing_wordpress_2.html +0 -0
- data/app/views/wco_email/email_templates/_meta.haml +6 -0
- data/app/views/wco_email/email_templates/_piousbox_roundborders.html.erb +1007 -0
- data/app/views/wco_email/email_templates/_piousbox_social.html.erb +181 -0
- data/app/views/wco_email/email_templates/_plain.haml +15 -0
- data/app/views/wco_email/email_templates/_rec_resume_shared_with_you.html.erb +39 -0
- data/app/views/wco_email/email_templates/_slug-1.html.erb +0 -0
- data/app/views/wco_email/email_templates/_slug-2.html.erb +0 -0
- data/app/views/wco_email/email_templates/_slug-3.html.erb +0 -0
- data/app/views/wco_email/email_templates/_tracking_footer.html.erb +13 -0
- data/app/views/wco_email/email_templates/_wasyaco_roundborders.html.erb +686 -0
- data/app/views/wco_email/email_templates/_wasyaco_social.html.erb +181 -0
- data/app/views/wco_email/email_templates/edit.haml +6 -0
- data/app/views/wco_email/email_templates/new.haml +6 -0
- data/app/views/wco_email/email_templates/show.haml +11 -0
- data/app/views/wco_email/email_templates/show_iframe.haml +2 -0
- data/app/views/wco_email/lead_action_templates/_header.haml +7 -0
- data/app/views/wco_email/lead_actions/_header.haml +8 -0
- data/app/views/wco_email/message_stubs/_index.haml +10 -0
- data/app/views/wco_email/messages/_form_reply.haml-trash +17 -0
- data/app/views/wco_email/messages/_meta.haml +30 -0
- data/app/views/wco_email/messages/show.haml +13 -0
- data/app/views/wco_email/messages/show_iframe.haml +5 -0
- data/app/views/wco_email/sessions/new.html.erb +4 -0
- data/app/views/wco_email/unsubscribes/_header.haml +4 -0
- data/app/views/wco_email/unsubscribes/_table.haml +22 -0
- data/config/initializers/assets.rb +10 -0
- data/config/routes.rb +49 -0
- data/lib/tasks/bjjcollective/sitemap.rb +50 -0
- data/lib/tasks/db_tasks.rake +12 -0
- data/lib/tasks/direct_mail_tasks.rake +35 -0
- data/lib/tasks/infinite_shelter/sitemap.rb +25 -0
- data/lib/tasks/piousbox/sitemap.rb +80 -0
- data/lib/tasks/publish2_wordpress_tasks.rake +54 -0
- data/lib/tasks/scrape_reddit_tasks.rake-bk +23 -0
- data/lib/tasks/trash/email_tasks.rake-trash +126 -0
- data/lib/tasks/trash/sitemap_tasks.rake-trash +146 -0
- data/lib/tasks/wasya_co/sitemap.rb +281 -0
- data/lib/tasks/wco_email_tasks.rake +117 -0
- data/lib/wco_email/README_email_actions.rb +7 -0
- data/lib/wco_email/README_email_contexts.rb +7 -0
- data/lib/wco_email/engine.rb +8 -0
- data/lib/wco_email.rb +19 -0
- metadata +493 -0
@@ -0,0 +1,98 @@
|
|
1
|
+
|
2
|
+
class WcoEmail::ApplicationMailer < ActionMailer::Base
|
3
|
+
|
4
|
+
default from: 'WasyaCo Consulting <no-reply@wco.com.de>'
|
5
|
+
helper(Wco::ApplicationHelper)
|
6
|
+
|
7
|
+
layout 'mailer'
|
8
|
+
|
9
|
+
|
10
|
+
def forwarder_notify msg_id
|
11
|
+
@msg = WcoEmail::Message.find msg_id
|
12
|
+
mail( to: "poxlovi@gmail.com",
|
13
|
+
subject: "POX::#{@msg.subject}" )
|
14
|
+
end
|
15
|
+
|
16
|
+
def shared_galleries profiles, gallery
|
17
|
+
return if profiles.count == 0
|
18
|
+
@gallery = gallery
|
19
|
+
@domain = Rails.application.config.action_mailer.default_url_options[:host]
|
20
|
+
@galleries_path = IshManager::Engine.routes.url_helpers.galleries_path
|
21
|
+
@gallery_path = IshManager::Engine.routes.url_helpers.gallery_path(@gallery.slug)
|
22
|
+
mail( :to => '314658@gmail.com',
|
23
|
+
:bcc => profiles.map { |p| p.email },
|
24
|
+
:subject => 'You got new shared galleries on pi manager' )
|
25
|
+
end
|
26
|
+
|
27
|
+
def option_alert option
|
28
|
+
@option = option
|
29
|
+
mail({
|
30
|
+
:to => option.profile.email,
|
31
|
+
:subject => "IshManager Option Alert :: #{option.ticker}",
|
32
|
+
})
|
33
|
+
end
|
34
|
+
|
35
|
+
def stock_alert watch_id
|
36
|
+
@watch = Iro::OptionWatch.find watch_id
|
37
|
+
mail({
|
38
|
+
to: @watch.profile.email,
|
39
|
+
subject: "Iro Watch Alert :: #{@watch.ticker} is #{@watch.direction} #{@watch.mark}."
|
40
|
+
})
|
41
|
+
end
|
42
|
+
|
43
|
+
def test_email
|
44
|
+
mail( to: DEFAULT_RECIPIENT, subject: "Test email at #{Time.now}" )
|
45
|
+
end
|
46
|
+
|
47
|
+
## 2023-04-02 _vp_ Continue.
|
48
|
+
## 2023-09-24 _vp_ Continue : )
|
49
|
+
def send_context_email ctx_id
|
50
|
+
@ctx = Ctx.find ctx_id
|
51
|
+
@lead = Wco::Lead.find @ctx.lead_id
|
52
|
+
@tmpl_config = OpenStruct.new JSON.parse( @ctx.tmpl[:config_json] )
|
53
|
+
|
54
|
+
@utm_tracking_str = {
|
55
|
+
'cid' => @ctx.lead_id,
|
56
|
+
'utm_campaign' => @ctx.tmpl.slug,
|
57
|
+
'utm_medium' => 'email',
|
58
|
+
'utm_source' => @ctx.tmpl.slug,
|
59
|
+
}.map { |k, v| "#{k}=#{v}" }.join("&")
|
60
|
+
|
61
|
+
# @origin = "https://#{Rails.application.config.action_mailer.default_url_options[:host]}"
|
62
|
+
|
63
|
+
@unsubscribe_url = WcoEmail::Engine.routes.url_helpers.unsubscribes_url({
|
64
|
+
template_id: @ctx.tmpl.id,
|
65
|
+
lead_id: @lead.id,
|
66
|
+
token: @lead.unsubscribe_token,
|
67
|
+
host: Rails.application.routes.default_url_options[:host],
|
68
|
+
})
|
69
|
+
# renderer = Tmp6Ctl.new
|
70
|
+
# renderer = IshManager::ApplicationController.new
|
71
|
+
# renderer.send( :include, ::IshManager::ApplicationHelper )
|
72
|
+
# renderer.send( :request, { host: 'test-host' } )
|
73
|
+
renderer = WcoEmail::ApplicationMailer.new
|
74
|
+
|
75
|
+
renderer.instance_variable_set( :@ctx, @ctx )
|
76
|
+
renderer.instance_variable_set( :@lead, @ctx.lead )
|
77
|
+
renderer.instance_variable_set( :@utm_tracking_str, @utm_tracking_str )
|
78
|
+
renderer.instance_variable_set( :@unsubscribe_url, @unsubscribe_url )
|
79
|
+
renderer.instance_variable_set( :@tmpl_config, @tmpl_config )
|
80
|
+
|
81
|
+
# eval( @ctx.tmpl.config_exe )
|
82
|
+
|
83
|
+
rendered_str = renderer.render_to_string("/wco_email/email_templates/_#{@ctx.tmpl.layout}")
|
84
|
+
@ctx.update({
|
85
|
+
rendered_str: rendered_str,
|
86
|
+
sent_at: Time.now.to_s,
|
87
|
+
})
|
88
|
+
|
89
|
+
mail( from: @ctx.from_email,
|
90
|
+
to: @ctx.to_email,
|
91
|
+
cc: @ctx.cc,
|
92
|
+
bcc: "poxlovi@gmail.com",
|
93
|
+
subject: ERB.new( @ctx.subject ).result( @ctx.get_binding ),
|
94
|
+
body: rendered_str,
|
95
|
+
content_type: "text/html" )
|
96
|
+
end
|
97
|
+
|
98
|
+
end
|