mail_engine 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/.yardoc/checksums +9 -7
- data/.yardoc/objects/ActionMailer/Base/collect_responses_and_parts_order_i.dat +0 -0
- data/.yardoc/objects/ActionMailer/Base/mail_i.dat +0 -0
- data/.yardoc/objects/ActionMailer/Base/origin_mail_i.dat +0 -0
- data/.yardoc/objects/ActionMailer/Base/set_layout_and_partials_i.dat +0 -0
- data/.yardoc/objects/ActionMailer/Base.dat +0 -0
- data/.yardoc/objects/ActionMailer/Collector/custom_i.dat +0 -0
- data/.yardoc/objects/ActionMailer/Collector.dat +0 -0
- data/.yardoc/objects/ActionMailer.dat +0 -0
- data/.yardoc/objects/LiquidView/PROTECTED_ASSIGNS.dat +0 -0
- data/.yardoc/objects/LiquidView/PROTECTED_INSTANCE_VARIABLES.dat +0 -0
- data/.yardoc/objects/LiquidView/call_c.dat +0 -0
- data/.yardoc/objects/LiquidView/compilable_3F_i.dat +0 -0
- data/.yardoc/objects/LiquidView/initialize_i.dat +0 -0
- data/.yardoc/objects/LiquidView/render_i.dat +0 -0
- data/.yardoc/objects/LiquidView.dat +0 -0
- data/.yardoc/objects/MailEngine/ActsAsMailReceiver/ClassMethods/acts_as_mail_receiver_i.dat +0 -0
- data/.yardoc/objects/MailEngine/ActsAsMailReceiver/ClassMethods/check_method_existance_21_i.dat +0 -0
- data/.yardoc/objects/MailEngine/ActsAsMailReceiver/ClassMethods.dat +0 -0
- data/.yardoc/objects/MailEngine/ActsAsMailReceiver.dat +0 -0
- data/.yardoc/objects/MailEngine/Base/_40_40configurations.dat +0 -0
- data/.yardoc/objects/MailEngine/Base/current_config_c.dat +0 -0
- data/.yardoc/objects/MailEngine/Base/send_marketing_mail_c.dat +0 -0
- data/.yardoc/objects/MailEngine/Base.dat +0 -0
- data/.yardoc/objects/MailEngine/Configuration/load_c.dat +0 -0
- data/.yardoc/objects/MailEngine/Configuration.dat +0 -0
- data/.yardoc/objects/MailEngine/CopyMigrations/copy_migrations_i.dat +0 -0
- data/.yardoc/objects/MailEngine/CopyMigrations.dat +0 -0
- data/.yardoc/objects/MailEngine/CopyResources/copy_resources_i.dat +0 -0
- data/.yardoc/objects/MailEngine/CopyResources.dat +0 -0
- data/.yardoc/objects/MailEngine/CreateConfig/create_config_file_i.dat +0 -0
- data/.yardoc/objects/MailEngine/CreateConfig.dat +0 -0
- data/.yardoc/objects/MailEngine/Engine.dat +0 -0
- data/.yardoc/objects/MailEngine/HtmlDocumentAssetsReplacer/check_21_c.dat +0 -0
- data/.yardoc/objects/MailEngine/HtmlDocumentAssetsReplacer/get_resource_url_c.dat +0 -0
- data/.yardoc/objects/MailEngine/HtmlDocumentAssetsReplacer/process_c.dat +0 -0
- data/.yardoc/objects/MailEngine/HtmlDocumentAssetsReplacer/replace_resource_in_html_c.dat +0 -0
- data/.yardoc/objects/MailEngine/HtmlDocumentAssetsReplacer.dat +0 -0
- data/.yardoc/objects/MailEngine/Install/copy_migrations_i.dat +0 -0
- data/.yardoc/objects/MailEngine/Install/copy_resources_i.dat +0 -0
- data/.yardoc/objects/MailEngine/Install/create_config_i.dat +0 -0
- data/.yardoc/objects/MailEngine/Install.dat +0 -0
- data/.yardoc/objects/MailEngine/MailLogSubscriber/deliver_i.dat +0 -0
- data/.yardoc/objects/MailEngine/MailLogSubscriber.dat +0 -0
- data/.yardoc/objects/MailEngine/MailTemplateResolver/find_templates_i.dat +0 -0
- data/.yardoc/objects/MailEngine/MailTemplateResolver/initialize_template_i.dat +0 -0
- data/.yardoc/objects/MailEngine/MailTemplateResolver/normalize_array_i.dat +0 -0
- data/.yardoc/objects/MailEngine/MailTemplateResolver/normalize_path_i.dat +0 -0
- data/.yardoc/objects/MailEngine/MailTemplateResolver/virtual_path_i.dat +0 -0
- data/.yardoc/objects/MailEngine/MailTemplateResolver.dat +0 -0
- data/.yardoc/objects/MailEngine/PLACEHOLDERS_IN_LAYOUT.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/Base/ClassMethods/sendgrid_header_i.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/Base/ClassMethods.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/Base/InstanceMethods.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/Base.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/FilterSetting/data_3D_i.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/FilterSetting/data_i.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/FilterSetting/initialize_i.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/FilterSetting/validate_config_21_i.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/FilterSetting.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/RestApi/blocks_c.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/RestApi/bounces_c.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/RestApi/invalidemails_c.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/RestApi/spamreports_c.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/RestApi/stats_c.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/RestApi.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/RestApiError.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi/add_sub_val_i.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi/add_to_i.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi/category_i.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi/filters_i.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi/initialize_i.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi/set_send_to_i.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi/set_unique_args_i.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi/to_hash_i.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi/to_json_i.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi/to_s_i.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid.dat +0 -0
- data/.yardoc/objects/MailEngine/VERSION.dat +0 -0
- data/.yardoc/objects/MailEngine/ZipProcessor/extract_all_files_c.dat +0 -0
- data/.yardoc/objects/MailEngine/ZipProcessor.dat +0 -0
- data/.yardoc/objects/MailEngine.dat +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/.yardoc/proxy_types +0 -0
- data/Gemfile +0 -1
- data/VERSION +1 -1
- data/app/controllers/mail_engine/application_controller.rb +0 -2
- data/doc/ActionMailer/Base.html +48 -4
- data/doc/ActionMailer/Collector.html +11 -11
- data/doc/ActionMailer.html +1 -1
- data/doc/LiquidView.html +453 -0
- data/doc/MailEngine/ActsAsMailReceiver/ClassMethods.html +1 -1
- data/doc/MailEngine/ActsAsMailReceiver.html +1 -1
- data/doc/MailEngine/Base.html +14 -12
- data/doc/MailEngine/Configuration.html +1 -1
- data/doc/MailEngine/CopyMigrations.html +1 -1
- data/doc/MailEngine/CopyResources.html +1 -1
- data/doc/MailEngine/CreateConfig.html +1 -1
- data/doc/MailEngine/Engine.html +1 -1
- data/doc/MailEngine/HtmlDocumentAssetsReplacer.html +1 -1
- data/doc/MailEngine/Install.html +1 -1
- data/doc/MailEngine/MailLogSubscriber.html +1 -1
- data/doc/MailEngine/MailTemplateResolver.html +502 -0
- data/doc/MailEngine/Sendgrid/Base/ClassMethods.html +1 -1
- data/doc/MailEngine/Sendgrid/Base/InstanceMethods.html +1 -1
- data/doc/MailEngine/Sendgrid/Base.html +1 -1
- data/doc/MailEngine/Sendgrid/FilterSetting.html +1 -1
- data/doc/MailEngine/Sendgrid/RestApi.html +1 -1
- data/doc/MailEngine/Sendgrid/RestApiError.html +1 -1
- data/doc/MailEngine/Sendgrid/SmtpApi.html +99 -30
- data/doc/MailEngine/Sendgrid.html +1 -1
- data/doc/MailEngine/ZipProcessor.html +1 -1
- data/doc/MailEngine.html +3 -3
- data/doc/_index.html +25 -5
- data/doc/class_list.html +1 -1
- data/doc/file.README.html +70 -2
- data/doc/index.html +70 -2
- data/doc/method_list.html +88 -8
- data/doc/top-level-namespace.html +3 -1
- data/lib/mail_engine/action_mailer_patch.rb +2 -2
- data/lib/mail_engine/engine.rb +3 -7
- data/mail_engine.gemspec +18 -5
- data/test/functional/user_mailer_test.rb +2 -5
- metadata +27 -25
@@ -208,6 +208,30 @@ A new instance of SmtpApi.
|
|
208
208
|
</p>
|
209
209
|
</div></span>
|
210
210
|
|
211
|
+
</li>
|
212
|
+
|
213
|
+
|
214
|
+
<li class="public ">
|
215
|
+
<span class="summary_signature">
|
216
|
+
|
217
|
+
<a href="#set_send_to-instance_method" title="#set_send_to (instance method)">- (Object) <strong>set_send_to</strong>(to) </a>
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
</span>
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
<span class="summary_desc"><div class='inline'><p>
|
231
|
+
for now only allow to send to one receiver once.
|
232
|
+
</p>
|
233
|
+
</div></span>
|
234
|
+
|
211
235
|
</li>
|
212
236
|
|
213
237
|
|
@@ -361,17 +385,17 @@ A new instance of SmtpApi
|
|
361
385
|
<pre class="lines">
|
362
386
|
|
363
387
|
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
388
|
+
71
|
389
|
+
72
|
390
|
+
73
|
391
|
+
74</pre>
|
368
392
|
</td>
|
369
393
|
<td>
|
370
|
-
<pre class="code"><span class="info file"># File 'lib/mail_engine/sendgrid/smtp_api.rb', line
|
394
|
+
<pre class="code"><span class="info file"># File 'lib/mail_engine/sendgrid/smtp_api.rb', line 71</span>
|
371
395
|
|
372
396
|
<span class='def def kw'>def</span> <span class='add_sub_val identifier id'>add_sub_val</span><span class='lparen token'>(</span><span class='var identifier id'>var</span><span class='comma token'>,</span> <span class='val identifier id'>val</span><span class='rparen token'>)</span>
|
373
397
|
<span class='@data ivar id'>@data</span><span class='lbrack token'>[</span><span class='string val'>'sub'</span><span class='rbrack token'>]</span> <span class='opasgn op'>||=</span> <span class='lbrace token'>{</span><span class='rbrace token'>}</span>
|
374
|
-
<span class='@data ivar id'>@data</span><span class='lbrack token'>[</span><span class='string val'>'sub'</span><span class='rbrack token'>]</span><span class='lbrack token'>[</span><span class='var identifier id'>var</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='
|
398
|
+
<span class='@data ivar id'>@data</span><span class='lbrack token'>[</span><span class='string val'>'sub'</span><span class='rbrack token'>]</span><span class='lbrack token'>[</span><span class='var identifier id'>var</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='Array constant id'>Array</span><span class='dot token'>.</span><span class='wrap identifier id'>wrap</span><span class='lparen token'>(</span><span class='val identifier id'>val</span><span class='rparen token'>)</span>
|
375
399
|
<span class='end end kw'>end</span>
|
376
400
|
</pre>
|
377
401
|
</td>
|
@@ -392,18 +416,18 @@ A new instance of SmtpApi
|
|
392
416
|
<pre class="lines">
|
393
417
|
|
394
418
|
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
419
|
+
65
|
420
|
+
66
|
421
|
+
67
|
422
|
+
68
|
423
|
+
69</pre>
|
400
424
|
</td>
|
401
425
|
<td>
|
402
|
-
<pre class="code"><span class="info file"># File 'lib/mail_engine/sendgrid/smtp_api.rb', line
|
426
|
+
<pre class="code"><span class="info file"># File 'lib/mail_engine/sendgrid/smtp_api.rb', line 65</span>
|
403
427
|
|
404
428
|
<span class='def def kw'>def</span> <span class='add_to identifier id'>add_to</span><span class='lparen token'>(</span><span class='to identifier id'>to</span><span class='rparen token'>)</span>
|
405
429
|
<span class='@data ivar id'>@data</span><span class='lbrack token'>[</span><span class='string val'>'to'</span><span class='rbrack token'>]</span> <span class='opasgn op'>||=</span> <span class='lbrack token'>[</span><span class='rbrack token'>]</span>
|
406
|
-
<span class='@data ivar id'>@data</span><span class='lbrack token'>[</span><span class='string val'>'to'</span><span class='rbrack token'>]</span> <span class='opasgn op'>+=</span> <span class='
|
430
|
+
<span class='@data ivar id'>@data</span><span class='lbrack token'>[</span><span class='string val'>'to'</span><span class='rbrack token'>]</span> <span class='opasgn op'>+=</span> <span class='Array constant id'>Array</span><span class='dot token'>.</span><span class='wrap identifier id'>wrap</span><span class='lparen token'>(</span><span class='to identifier id'>to</span><span class='rparen token'>)</span>
|
407
431
|
<span class='@data ivar id'>@data</span><span class='lbrack token'>[</span><span class='string val'>'to'</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='uniq! fid id'>uniq!</span>
|
408
432
|
<span class='end end kw'>end</span>
|
409
433
|
</pre>
|
@@ -472,6 +496,51 @@ A new instance of SmtpApi
|
|
472
496
|
</td>
|
473
497
|
</tr>
|
474
498
|
</table>
|
499
|
+
</div>
|
500
|
+
|
501
|
+
<div class="method_details ">
|
502
|
+
<p class="signature " id="set_send_to-instance_method">
|
503
|
+
|
504
|
+
- (<tt>Object</tt>) <strong>set_send_to</strong>(to)
|
505
|
+
|
506
|
+
|
507
|
+
|
508
|
+
</p><div class="docstring">
|
509
|
+
<div class="discussion">
|
510
|
+
<p>
|
511
|
+
for now only allow to send to one receiver once. maybe we don’t like
|
512
|
+
people received a mail which allow people to view all receivers
|
513
|
+
</p>
|
514
|
+
|
515
|
+
|
516
|
+
</div>
|
517
|
+
</div>
|
518
|
+
<div class="tags">
|
519
|
+
|
520
|
+
</div><table class="source_code">
|
521
|
+
<tr>
|
522
|
+
<td>
|
523
|
+
<pre class="lines">
|
524
|
+
|
525
|
+
|
526
|
+
59
|
527
|
+
60
|
528
|
+
61
|
529
|
+
62
|
530
|
+
63</pre>
|
531
|
+
</td>
|
532
|
+
<td>
|
533
|
+
<pre class="code"><span class="info file"># File 'lib/mail_engine/sendgrid/smtp_api.rb', line 59</span>
|
534
|
+
|
535
|
+
<span class='def def kw'>def</span> <span class='set_send_to identifier id'>set_send_to</span><span class='lparen token'>(</span><span class='to identifier id'>to</span><span class='rparen token'>)</span>
|
536
|
+
<span class='@data ivar id'>@data</span><span class='lbrack token'>[</span><span class='string val'>'to'</span><span class='rbrack token'>]</span> <span class='opasgn op'>||=</span> <span class='lbrack token'>[</span><span class='rbrack token'>]</span>
|
537
|
+
<span class='@data ivar id'>@data</span><span class='lbrack token'>[</span><span class='string val'>'to'</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='Array constant id'>Array</span><span class='dot token'>.</span><span class='wrap identifier id'>wrap</span><span class='lparen token'>(</span><span class='to identifier id'>to</span><span class='rparen token'>)</span>
|
538
|
+
<span class='@data ivar id'>@data</span><span class='lbrack token'>[</span><span class='string val'>'to'</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='uniq! fid id'>uniq!</span>
|
539
|
+
<span class='end end kw'>end</span>
|
540
|
+
</pre>
|
541
|
+
</td>
|
542
|
+
</tr>
|
543
|
+
</table>
|
475
544
|
</div>
|
476
545
|
|
477
546
|
<div class="method_details ">
|
@@ -487,12 +556,12 @@ A new instance of SmtpApi
|
|
487
556
|
<pre class="lines">
|
488
557
|
|
489
558
|
|
490
|
-
|
491
|
-
|
492
|
-
|
559
|
+
76
|
560
|
+
77
|
561
|
+
78</pre>
|
493
562
|
</td>
|
494
563
|
<td>
|
495
|
-
<pre class="code"><span class="info file"># File 'lib/mail_engine/sendgrid/smtp_api.rb', line
|
564
|
+
<pre class="code"><span class="info file"># File 'lib/mail_engine/sendgrid/smtp_api.rb', line 76</span>
|
496
565
|
|
497
566
|
<span class='def def kw'>def</span> <span class='set_unique_args identifier id'>set_unique_args</span><span class='lparen token'>(</span><span class='val identifier id'>val</span><span class='rparen token'>)</span>
|
498
567
|
<span class='@data ivar id'>@data</span><span class='lbrack token'>[</span><span class='string val'>'unique_args'</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='val identifier id'>val</span> <span class='if if_mod kw'>if</span> <span class='val identifier id'>val</span><span class='dot token'>.</span><span class='instance_of? fid id'>instance_of?</span><span class='lparen token'>(</span><span class='Hash constant id'>Hash</span><span class='rparen token'>)</span>
|
@@ -516,12 +585,12 @@ A new instance of SmtpApi
|
|
516
585
|
<pre class="lines">
|
517
586
|
|
518
587
|
|
519
|
-
|
520
|
-
|
521
|
-
|
588
|
+
84
|
589
|
+
85
|
590
|
+
86</pre>
|
522
591
|
</td>
|
523
592
|
<td>
|
524
|
-
<pre class="code"><span class="info file"># File 'lib/mail_engine/sendgrid/smtp_api.rb', line
|
593
|
+
<pre class="code"><span class="info file"># File 'lib/mail_engine/sendgrid/smtp_api.rb', line 84</span>
|
525
594
|
|
526
595
|
<span class='def def kw'>def</span> <span class='to_hash identifier id'>to_hash</span>
|
527
596
|
<span class='lbrace token'>{</span><span class='string val'>'X-SMTPAPI'</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='to_json identifier id'>to_json</span><span class='rbrace token'>}</span>
|
@@ -545,12 +614,12 @@ A new instance of SmtpApi
|
|
545
614
|
<pre class="lines">
|
546
615
|
|
547
616
|
|
548
|
-
|
549
|
-
|
550
|
-
|
617
|
+
80
|
618
|
+
81
|
619
|
+
82</pre>
|
551
620
|
</td>
|
552
621
|
<td>
|
553
|
-
<pre class="code"><span class="info file"># File 'lib/mail_engine/sendgrid/smtp_api.rb', line
|
622
|
+
<pre class="code"><span class="info file"># File 'lib/mail_engine/sendgrid/smtp_api.rb', line 80</span>
|
554
623
|
|
555
624
|
<span class='def def kw'>def</span> <span class='to_json identifier id'>to_json</span>
|
556
625
|
<span class='@data ivar id'>@data</span><span class='dot token'>.</span><span class='to_json identifier id'>to_json</span><span class='dot token'>.</span><span class='gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='regexp val'>/(["\]}])([,:])(["\[{])/</span><span class='comma token'>,</span> <span class='string val'>'\\1\\2 \\3'</span><span class='rparen token'>)</span>
|
@@ -574,12 +643,12 @@ A new instance of SmtpApi
|
|
574
643
|
<pre class="lines">
|
575
644
|
|
576
645
|
|
577
|
-
|
578
|
-
|
579
|
-
|
646
|
+
88
|
647
|
+
89
|
648
|
+
90</pre>
|
580
649
|
</td>
|
581
650
|
<td>
|
582
|
-
<pre class="code"><span class="info file"># File 'lib/mail_engine/sendgrid/smtp_api.rb', line
|
651
|
+
<pre class="code"><span class="info file"># File 'lib/mail_engine/sendgrid/smtp_api.rb', line 88</span>
|
583
652
|
|
584
653
|
<span class='def def kw'>def</span> <span class='to_s identifier id'>to_s</span>
|
585
654
|
<span class='string val'>'X-SMTPAPI: %s'</span> <span class='mod op'>%</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='to_json identifier id'>to_json</span>
|
@@ -595,7 +664,7 @@ A new instance of SmtpApi
|
|
595
664
|
</div>
|
596
665
|
|
597
666
|
<div id="footer">
|
598
|
-
Generated on
|
667
|
+
Generated on Mon Mar 14 22:31:44 2011 by
|
599
668
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
600
669
|
0.6.4 (ruby-1.8.7).
|
601
670
|
</div>
|
@@ -258,7 +258,7 @@ zip file. the second item is the unzip path.
|
|
258
258
|
</div>
|
259
259
|
|
260
260
|
<div id="footer">
|
261
|
-
Generated on
|
261
|
+
Generated on Mon Mar 14 22:31:45 2011 by
|
262
262
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
263
263
|
0.6.4 (ruby-1.8.7).
|
264
264
|
</div>
|
data/doc/MailEngine.html
CHANGED
@@ -64,7 +64,7 @@
|
|
64
64
|
|
65
65
|
<dt class="r2 last">Defined in:</dt>
|
66
66
|
<dd class="r2 last">lib/mail_engine/sendgrid/rest_api.rb<span class="defines">,<br />
|
67
|
-
lib/mail_engine.rb,<br /> lib/mail_engine/base.rb,<br /> lib/mail_engine/engine.rb,<br /> lib/mail_engine/version.rb,<br /> lib/mail_engine/sendgrid.rb,<br /> lib/mail_engine/configuration.rb,<br /> lib/mail_engine/zip_processor.rb,<br /> lib/mail_engine/sendgrid/base.rb,<br /> lib/mail_engine/sendgrid/smtp_api.rb,<br /> lib/mail_engine/generators/install.rb,<br /> lib/mail_engine/mail_log_subscriber.rb,<br /> lib/mail_engine/acts_as_mail_receiver.rb,<br /> lib/mail_engine/generators/create_config.rb,<br /> lib/mail_engine/generators/copy_resources.rb,<br /> lib/mail_engine/generators/copy_migrations.rb,<br /> lib/mail_engine/html_document_assets_replacer.rb</span>
|
67
|
+
lib/mail_engine.rb,<br /> lib/mail_engine/base.rb,<br /> lib/mail_engine/engine.rb,<br /> lib/mail_engine/version.rb,<br /> lib/mail_engine/sendgrid.rb,<br /> lib/mail_engine/configuration.rb,<br /> lib/mail_engine/zip_processor.rb,<br /> lib/mail_engine/sendgrid/base.rb,<br /> lib/mail_engine/sendgrid/smtp_api.rb,<br /> lib/mail_engine/generators/install.rb,<br /> lib/mail_engine/mail_log_subscriber.rb,<br /> lib/mail_engine/acts_as_mail_receiver.rb,<br /> lib/mail_engine/mail_template_resolver.rb,<br /> lib/mail_engine/generators/create_config.rb,<br /> lib/mail_engine/generators/copy_resources.rb,<br /> lib/mail_engine/generators/copy_migrations.rb,<br /> lib/mail_engine/html_document_assets_replacer.rb</span>
|
68
68
|
</dd>
|
69
69
|
|
70
70
|
</dl>
|
@@ -89,7 +89,7 @@ Used for setting a User model as a Mail Receiver Data Provider
|
|
89
89
|
|
90
90
|
|
91
91
|
|
92
|
-
<strong class="classes">Classes:</strong> <span class='object_link'><a href="MailEngine/Base.html" title="MailEngine::Base (class)">Base</a></span>, <span class='object_link'><a href="MailEngine/Configuration.html" title="MailEngine::Configuration (class)">Configuration</a></span>, <span class='object_link'><a href="MailEngine/CopyMigrations.html" title="MailEngine::CopyMigrations (class)">CopyMigrations</a></span>, <span class='object_link'><a href="MailEngine/CopyResources.html" title="MailEngine::CopyResources (class)">CopyResources</a></span>, <span class='object_link'><a href="MailEngine/CreateConfig.html" title="MailEngine::CreateConfig (class)">CreateConfig</a></span>, <span class='object_link'><a href="MailEngine/Engine.html" title="MailEngine::Engine (class)">Engine</a></span>, <span class='object_link'><a href="MailEngine/HtmlDocumentAssetsReplacer.html" title="MailEngine::HtmlDocumentAssetsReplacer (class)">HtmlDocumentAssetsReplacer</a></span>, <span class='object_link'><a href="MailEngine/Install.html" title="MailEngine::Install (class)">Install</a></span>, <span class='object_link'><a href="MailEngine/MailLogSubscriber.html" title="MailEngine::MailLogSubscriber (class)">MailLogSubscriber</a></span>, <span class='object_link'><a href="MailEngine/ZipProcessor.html" title="MailEngine::ZipProcessor (class)">ZipProcessor</a></span>
|
92
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="MailEngine/Base.html" title="MailEngine::Base (class)">Base</a></span>, <span class='object_link'><a href="MailEngine/Configuration.html" title="MailEngine::Configuration (class)">Configuration</a></span>, <span class='object_link'><a href="MailEngine/CopyMigrations.html" title="MailEngine::CopyMigrations (class)">CopyMigrations</a></span>, <span class='object_link'><a href="MailEngine/CopyResources.html" title="MailEngine::CopyResources (class)">CopyResources</a></span>, <span class='object_link'><a href="MailEngine/CreateConfig.html" title="MailEngine::CreateConfig (class)">CreateConfig</a></span>, <span class='object_link'><a href="MailEngine/Engine.html" title="MailEngine::Engine (class)">Engine</a></span>, <span class='object_link'><a href="MailEngine/HtmlDocumentAssetsReplacer.html" title="MailEngine::HtmlDocumentAssetsReplacer (class)">HtmlDocumentAssetsReplacer</a></span>, <span class='object_link'><a href="MailEngine/Install.html" title="MailEngine::Install (class)">Install</a></span>, <span class='object_link'><a href="MailEngine/MailLogSubscriber.html" title="MailEngine::MailLogSubscriber (class)">MailLogSubscriber</a></span>, <span class='object_link'><a href="MailEngine/MailTemplateResolver.html" title="MailEngine::MailTemplateResolver (class)">MailTemplateResolver</a></span>, <span class='object_link'><a href="MailEngine/ZipProcessor.html" title="MailEngine::ZipProcessor (class)">ZipProcessor</a></span>
|
93
93
|
|
94
94
|
|
95
95
|
</p>
|
@@ -137,7 +137,7 @@ used for looking up which layout needs which placeholders.
|
|
137
137
|
</div>
|
138
138
|
|
139
139
|
<div id="footer">
|
140
|
-
Generated on
|
140
|
+
Generated on Mon Mar 14 22:31:45 2011 by
|
141
141
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
142
142
|
0.6.4 (ruby-1.8.7).
|
143
143
|
</div>
|
data/doc/_index.html
CHANGED
@@ -92,16 +92,16 @@
|
|
92
92
|
<ul>
|
93
93
|
|
94
94
|
<li>
|
95
|
-
<span class='object_link'><a href="
|
95
|
+
<span class='object_link'><a href="ActionMailer/Base.html" title="ActionMailer::Base (class)">Base</a></span>
|
96
96
|
|
97
|
-
<small>(
|
97
|
+
<small>(ActionMailer)</small>
|
98
98
|
|
99
99
|
</li>
|
100
100
|
|
101
101
|
<li>
|
102
|
-
<span class='object_link'><a href="
|
102
|
+
<span class='object_link'><a href="MailEngine/Sendgrid/Base.html" title="MailEngine::Sendgrid::Base (module)">Base</a></span>
|
103
103
|
|
104
|
-
<small>(
|
104
|
+
<small>(MailEngine::Sendgrid)</small>
|
105
105
|
|
106
106
|
</li>
|
107
107
|
|
@@ -243,6 +243,19 @@
|
|
243
243
|
</td><td valign='top' width="33%">
|
244
244
|
|
245
245
|
|
246
|
+
<ul id="alpha_L" class="alpha">
|
247
|
+
<li class="letter">L</li>
|
248
|
+
<ul>
|
249
|
+
|
250
|
+
<li>
|
251
|
+
<span class='object_link'><a href="LiquidView.html" title="LiquidView (class)">LiquidView</a></span>
|
252
|
+
|
253
|
+
</li>
|
254
|
+
|
255
|
+
</ul>
|
256
|
+
</ul>
|
257
|
+
|
258
|
+
|
246
259
|
<ul id="alpha_M" class="alpha">
|
247
260
|
<li class="letter">M</li>
|
248
261
|
<ul>
|
@@ -259,6 +272,13 @@
|
|
259
272
|
|
260
273
|
</li>
|
261
274
|
|
275
|
+
<li>
|
276
|
+
<span class='object_link'><a href="MailEngine/MailTemplateResolver.html" title="MailEngine::MailTemplateResolver (class)">MailTemplateResolver</a></span>
|
277
|
+
|
278
|
+
<small>(MailEngine)</small>
|
279
|
+
|
280
|
+
</li>
|
281
|
+
|
262
282
|
</ul>
|
263
283
|
</ul>
|
264
284
|
|
@@ -327,7 +347,7 @@
|
|
327
347
|
</div></div>
|
328
348
|
|
329
349
|
<div id="footer">
|
330
|
-
Generated on
|
350
|
+
Generated on Mon Mar 14 22:31:43 2011 by
|
331
351
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
332
352
|
0.6.4 (ruby-1.8.7).
|
333
353
|
</div>
|
data/doc/class_list.html
CHANGED
@@ -27,7 +27,7 @@
|
|
27
27
|
|
28
28
|
<ul id="full_list" class="class">
|
29
29
|
<li><span class='object_link'><a href="top-level-namespace.html" title=" (root)">Top Level Namespace</a></span></li>
|
30
|
-
<li><a class='toggle'></a> <span class='object_link'><a href="ActionMailer.html" title="ActionMailer (module)">ActionMailer</a></span><small class='search_info'>Top Level Namespace</small></li><ul><li><span class='object_link'><a href="ActionMailer/Base.html" title="ActionMailer::Base (class)">Base</a></span> < Object<small class='search_info'>ActionMailer</small></li><li><span class='object_link'><a href="ActionMailer/Collector.html" title="ActionMailer::Collector (class)">Collector</a></span> < Object<small class='search_info'>ActionMailer</small></li></ul><li><a class='toggle'></a> <span class='object_link'><a href="MailEngine.html" title="MailEngine (module)">MailEngine</a></span><small class='search_info'>Top Level Namespace</small></li><ul><li><a class='toggle'></a> <span class='object_link'><a href="MailEngine/ActsAsMailReceiver.html" title="MailEngine::ActsAsMailReceiver (module)">ActsAsMailReceiver</a></span><small class='search_info'>MailEngine</small></li><ul><li><span class='object_link'><a href="MailEngine/ActsAsMailReceiver/ClassMethods.html" title="MailEngine::ActsAsMailReceiver::ClassMethods (module)">ClassMethods</a></span><small class='search_info'>MailEngine::ActsAsMailReceiver</small></li></ul><li><span class='object_link'><a href="MailEngine/Base.html" title="MailEngine::Base (class)">Base</a></span> < Object<small class='search_info'>MailEngine</small></li><li><span class='object_link'><a href="MailEngine/Configuration.html" title="MailEngine::Configuration (class)">Configuration</a></span> < Object<small class='search_info'>MailEngine</small></li><li><span class='object_link'><a href="MailEngine/CopyMigrations.html" title="MailEngine::CopyMigrations (class)">CopyMigrations</a></span> < Base<small class='search_info'>MailEngine</small></li><li><span class='object_link'><a href="MailEngine/CopyResources.html" title="MailEngine::CopyResources (class)">CopyResources</a></span> < Base<small class='search_info'>MailEngine</small></li><li><span class='object_link'><a href="MailEngine/CreateConfig.html" title="MailEngine::CreateConfig (class)">CreateConfig</a></span> < Base<small class='search_info'>MailEngine</small></li><li><span class='object_link'><a href="MailEngine/Engine.html" title="MailEngine::Engine (class)">Engine</a></span> < Engine<small class='search_info'>MailEngine</small></li><li><span class='object_link'><a href="MailEngine/HtmlDocumentAssetsReplacer.html" title="MailEngine::HtmlDocumentAssetsReplacer (class)">HtmlDocumentAssetsReplacer</a></span> < Object<small class='search_info'>MailEngine</small></li><li><span class='object_link'><a href="MailEngine/Install.html" title="MailEngine::Install (class)">Install</a></span> < Base<small class='search_info'>MailEngine</small></li><li><span class='object_link'><a href="MailEngine/MailLogSubscriber.html" title="MailEngine::MailLogSubscriber (class)">MailLogSubscriber</a></span> < LogSubscriber<small class='search_info'>MailEngine</small></li><li><a class='toggle'></a> <span class='object_link'><a href="MailEngine/Sendgrid.html" title="MailEngine::Sendgrid (module)">Sendgrid</a></span><small class='search_info'>MailEngine</small></li><ul><li><a class='toggle'></a> <span class='object_link'><a href="MailEngine/Sendgrid/Base.html" title="MailEngine::Sendgrid::Base (module)">Base</a></span><small class='search_info'>MailEngine::Sendgrid</small></li><ul><li><span class='object_link'><a href="MailEngine/Sendgrid/Base/ClassMethods.html" title="MailEngine::Sendgrid::Base::ClassMethods (module)">ClassMethods</a></span><small class='search_info'>MailEngine::Sendgrid::Base</small></li><li><span class='object_link'><a href="MailEngine/Sendgrid/Base/InstanceMethods.html" title="MailEngine::Sendgrid::Base::InstanceMethods (module)">InstanceMethods</a></span><small class='search_info'>MailEngine::Sendgrid::Base</small></li></ul><li><span class='object_link'><a href="MailEngine/Sendgrid/FilterSetting.html" title="MailEngine::Sendgrid::FilterSetting (class)">FilterSetting</a></span> < Object<small class='search_info'>MailEngine::Sendgrid</small></li><li><span class='object_link'><a href="MailEngine/Sendgrid/RestApi.html" title="MailEngine::Sendgrid::RestApi (class)">RestApi</a></span> < Object<small class='search_info'>MailEngine::Sendgrid</small></li><li><span class='object_link'><a href="MailEngine/Sendgrid/RestApiError.html" title="MailEngine::Sendgrid::RestApiError (class)">RestApiError</a></span> < StandardError<small class='search_info'>MailEngine::Sendgrid</small></li><li><span class='object_link'><a href="MailEngine/Sendgrid/SmtpApi.html" title="MailEngine::Sendgrid::SmtpApi (class)">SmtpApi</a></span> < Object<small class='search_info'>MailEngine::Sendgrid</small></li></ul><li><span class='object_link'><a href="MailEngine/ZipProcessor.html" title="MailEngine::ZipProcessor (class)">ZipProcessor</a></span> < Object<small class='search_info'>MailEngine</small></li></ul>
|
30
|
+
<li><a class='toggle'></a> <span class='object_link'><a href="ActionMailer.html" title="ActionMailer (module)">ActionMailer</a></span><small class='search_info'>Top Level Namespace</small></li><ul><li><span class='object_link'><a href="ActionMailer/Base.html" title="ActionMailer::Base (class)">Base</a></span> < Object<small class='search_info'>ActionMailer</small></li><li><span class='object_link'><a href="ActionMailer/Collector.html" title="ActionMailer::Collector (class)">Collector</a></span> < Object<small class='search_info'>ActionMailer</small></li></ul><li><span class='object_link'><a href="LiquidView.html" title="LiquidView (class)">LiquidView</a></span> < Object<small class='search_info'>Top Level Namespace</small></li><li><a class='toggle'></a> <span class='object_link'><a href="MailEngine.html" title="MailEngine (module)">MailEngine</a></span><small class='search_info'>Top Level Namespace</small></li><ul><li><a class='toggle'></a> <span class='object_link'><a href="MailEngine/ActsAsMailReceiver.html" title="MailEngine::ActsAsMailReceiver (module)">ActsAsMailReceiver</a></span><small class='search_info'>MailEngine</small></li><ul><li><span class='object_link'><a href="MailEngine/ActsAsMailReceiver/ClassMethods.html" title="MailEngine::ActsAsMailReceiver::ClassMethods (module)">ClassMethods</a></span><small class='search_info'>MailEngine::ActsAsMailReceiver</small></li></ul><li><span class='object_link'><a href="MailEngine/Base.html" title="MailEngine::Base (class)">Base</a></span> < Object<small class='search_info'>MailEngine</small></li><li><span class='object_link'><a href="MailEngine/Configuration.html" title="MailEngine::Configuration (class)">Configuration</a></span> < Object<small class='search_info'>MailEngine</small></li><li><span class='object_link'><a href="MailEngine/CopyMigrations.html" title="MailEngine::CopyMigrations (class)">CopyMigrations</a></span> < Base<small class='search_info'>MailEngine</small></li><li><span class='object_link'><a href="MailEngine/CopyResources.html" title="MailEngine::CopyResources (class)">CopyResources</a></span> < Base<small class='search_info'>MailEngine</small></li><li><span class='object_link'><a href="MailEngine/CreateConfig.html" title="MailEngine::CreateConfig (class)">CreateConfig</a></span> < Base<small class='search_info'>MailEngine</small></li><li><span class='object_link'><a href="MailEngine/Engine.html" title="MailEngine::Engine (class)">Engine</a></span> < Engine<small class='search_info'>MailEngine</small></li><li><span class='object_link'><a href="MailEngine/HtmlDocumentAssetsReplacer.html" title="MailEngine::HtmlDocumentAssetsReplacer (class)">HtmlDocumentAssetsReplacer</a></span> < Object<small class='search_info'>MailEngine</small></li><li><span class='object_link'><a href="MailEngine/Install.html" title="MailEngine::Install (class)">Install</a></span> < Base<small class='search_info'>MailEngine</small></li><li><span class='object_link'><a href="MailEngine/MailLogSubscriber.html" title="MailEngine::MailLogSubscriber (class)">MailLogSubscriber</a></span> < LogSubscriber<small class='search_info'>MailEngine</small></li><li><span class='object_link'><a href="MailEngine/MailTemplateResolver.html" title="MailEngine::MailTemplateResolver (class)">MailTemplateResolver</a></span> < Resolver<small class='search_info'>MailEngine</small></li><li><a class='toggle'></a> <span class='object_link'><a href="MailEngine/Sendgrid.html" title="MailEngine::Sendgrid (module)">Sendgrid</a></span><small class='search_info'>MailEngine</small></li><ul><li><a class='toggle'></a> <span class='object_link'><a href="MailEngine/Sendgrid/Base.html" title="MailEngine::Sendgrid::Base (module)">Base</a></span><small class='search_info'>MailEngine::Sendgrid</small></li><ul><li><span class='object_link'><a href="MailEngine/Sendgrid/Base/ClassMethods.html" title="MailEngine::Sendgrid::Base::ClassMethods (module)">ClassMethods</a></span><small class='search_info'>MailEngine::Sendgrid::Base</small></li><li><span class='object_link'><a href="MailEngine/Sendgrid/Base/InstanceMethods.html" title="MailEngine::Sendgrid::Base::InstanceMethods (module)">InstanceMethods</a></span><small class='search_info'>MailEngine::Sendgrid::Base</small></li></ul><li><span class='object_link'><a href="MailEngine/Sendgrid/FilterSetting.html" title="MailEngine::Sendgrid::FilterSetting (class)">FilterSetting</a></span> < Object<small class='search_info'>MailEngine::Sendgrid</small></li><li><span class='object_link'><a href="MailEngine/Sendgrid/RestApi.html" title="MailEngine::Sendgrid::RestApi (class)">RestApi</a></span> < Object<small class='search_info'>MailEngine::Sendgrid</small></li><li><span class='object_link'><a href="MailEngine/Sendgrid/RestApiError.html" title="MailEngine::Sendgrid::RestApiError (class)">RestApiError</a></span> < StandardError<small class='search_info'>MailEngine::Sendgrid</small></li><li><span class='object_link'><a href="MailEngine/Sendgrid/SmtpApi.html" title="MailEngine::Sendgrid::SmtpApi (class)">SmtpApi</a></span> < Object<small class='search_info'>MailEngine::Sendgrid</small></li></ul><li><span class='object_link'><a href="MailEngine/ZipProcessor.html" title="MailEngine::ZipProcessor (class)">ZipProcessor</a></span> < Object<small class='search_info'>MailEngine</small></li></ul>
|
31
31
|
|
32
32
|
</ul>
|
33
33
|
</div>
|
data/doc/file.README.html
CHANGED
@@ -97,12 +97,73 @@ to fit our needs in real project:</p>
|
|
97
97
|
|
98
98
|
<p><strong> Step 4: </strong></p>
|
99
99
|
|
100
|
+
<p>Add acts<em>as</em>mail_receiver definition to "Your User" model.</p>
|
101
|
+
|
102
|
+
<pre class="code"><span class='class class kw'>class</span> <span class='User constant id'>User</span> <span class='lt op'><</span> <span class='AR constant id'>AR</span>
|
103
|
+
<span class='acts_as_mail_receiver identifier id'>acts_as_mail_receiver</span> <span class='symbol val'>:payload_columns</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='dstring node'>%w{firstname lastname}</span><span class='comma token'>,</span>
|
104
|
+
<span class='symbol val'>:groups</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='dstring node'>%w{all english_users chinese_users}</span>
|
105
|
+
<span class='end end kw'>end</span>
|
106
|
+
</pre>
|
107
|
+
|
108
|
+
<ol>
|
109
|
+
<li> User model must have 'email' and payload specified columns, or else you can delegate to other model.</li>
|
110
|
+
<li> "acts<em>as</em>mail_receiver" statement has to place below the scope statements.</li>
|
111
|
+
</ol>
|
112
|
+
|
113
|
+
|
114
|
+
<p><strong> Step 5: </strong></p>
|
115
|
+
|
116
|
+
<p>Add sendgrid smtp api configure:</p>
|
117
|
+
|
118
|
+
<pre class="code"><span class='class class kw'>class</span> <span class='UserMailer constant id'>UserMailer</span> <span class='lt op'><</span> <span class='ActionMailer constant id'>ActionMailer</span><span class='colon2 op'>::</span><span class='Base constant id'>Base</span>
|
119
|
+
<span class='sendgrid_header identifier id'>sendgrid_header</span> <span class='do do kw'>do</span>
|
120
|
+
<span class='category identifier id'>category</span> <span class='string val'>"xxx"</span>
|
121
|
+
|
122
|
+
<span class='filters identifier id'>filters</span> <span class='lbrace token'>{</span>
|
123
|
+
<span class='opentrack identifier id'>opentrack</span> <span class='string val'>"enable"</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='integer val'>1</span>
|
124
|
+
<span class='clicktrack identifier id'>clicktrack</span> <span class='string val'>"enable"</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='integer val'>1</span>
|
125
|
+
<span class='subscriptiontrack identifier id'>subscriptiontrack</span> <span class='string val'>"enable"</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='integer val'>0</span>
|
126
|
+
<span class='template identifier id'>template</span> <span class='string val'>"enable"</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='integer val'>0</span>
|
127
|
+
<span class='footer identifier id'>footer</span> <span class='string val'>"enable"</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='integer val'>0</span>
|
128
|
+
<span class='rbrace token'>}</span>
|
129
|
+
<span class='end end kw'>end</span>
|
130
|
+
<span class='end end kw'>end</span>
|
131
|
+
</pre>
|
132
|
+
|
133
|
+
<p>For the detail information please check sendgrid.com.</p>
|
134
|
+
|
135
|
+
<p><strong> Step 6: </strong></p>
|
136
|
+
|
137
|
+
<p>Add below line to production.rb or development.rb for specifing the host.
|
138
|
+
it will used when generate resource url when upload zip file.</p>
|
139
|
+
|
140
|
+
<pre class="code"><span class='config identifier id'>config</span><span class='dot token'>.</span><span class='action_mailer identifier id'>action_mailer</span><span class='dot token'>.</span><span class='default_url_options identifier id'>default_url_options</span> <span class='assign token'>=</span> <span class='lbrace token'>{</span> <span class='symbol val'>:host</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='string val'>"lvh.me:3000"</span> <span class='rbrace token'>}</span>
|
141
|
+
</pre>
|
142
|
+
|
143
|
+
<p><strong> Step 7: </strong></p>
|
144
|
+
|
100
145
|
<p>Add below line to the crontab list of your sever:</p>
|
101
146
|
|
102
147
|
<pre class="code"><span class='comment val'>### check mail schedule for every 15 minutes ###</span>
|
103
148
|
<span class='mult op'>*</span><span class='regexp val'>/4 * * * * sh -c "cd /</span><span class='path identifier id'>path</span><span class='div op'>/</span><span class='to identifier id'>to</span><span class='div op'>/</span><span class='your identifier id'>your</span><span class='div op'>/</span><span class='system identifier id'>system</span> <span class='andop op'>&&</span> <span class='rake identifier id'>rake</span> <span class='mail_engine identifier id'>mail_engine</span><span class='symbol val'>:sendmail</span> <span class='RAILS_ENV constant id'>RAILS_ENV</span><span class='assign token'>=</span><span class='production identifier id'>production</span><span class='string val'>"
|
104
149
|
</span></pre>
|
105
150
|
|
151
|
+
<h1>Configuration</h1>
|
152
|
+
|
153
|
+
<p>Below is the config for development env.</p>
|
154
|
+
|
155
|
+
<pre class="code"><span class='development identifier id'>development</span><span class='colon op'>:</span>
|
156
|
+
<span class='log_mail identifier id'>log_mail</span><span class='colon op'>:</span> <span class='false false kw'>false</span> <span class='comment val'># if you want to enable the mail log, set true.</span>
|
157
|
+
<span class='user_class_name identifier id'>user_class_name</span><span class='colon op'>:</span> <span class='string val'>"User"</span> <span class='comment val'># Specify the User model in your system, which will used for mail schedule feature to find user groups and payloads.</span>
|
158
|
+
<span class='mount_at identifier id'>mount_at</span><span class='colon op'>:</span> <span class='string val'>"/admin/mail_engine"</span> <span class='comment val'># set the url path for mail engine.</span>
|
159
|
+
<span class='access_check_method identifier id'>access_check_method</span><span class='colon op'>:</span> <span class='string val'>"logged_in?"</span> <span class='comment val'># set a method name which will execute before each page action in mail engine.</span>
|
160
|
+
<span class='replacement_email identifier id'>replacement_email</span><span class='colon op'>:</span> <span class='string val'>"dev@youdomain.com"</span> <span class='comment val'># if you want to send all mail to one email, like on staging server or development environment, you can set this, or else don't set it.</span>
|
161
|
+
<span class='sendgrid identifier id'>sendgrid</span><span class='colon op'>:</span> <span class='comment val'># Below you need to set the sendgrid account info.</span>
|
162
|
+
<span class='sendgrid_user identifier id'>sendgrid_user</span><span class='colon op'>:</span> <span class='string val'>"you send grid username"</span> <span class='comment val'># </span>
|
163
|
+
<span class='sendgrid_key identifier id'>sendgrid_key</span><span class='colon op'>:</span> <span class='string val'>"password"</span> <span class='comment val'># </span>
|
164
|
+
<span class='sendgrid_category identifier id'>sendgrid_category</span><span class='colon op'>:</span> <span class='string val'>"my sendgrid category"</span> <span class='comment val'># </span>
|
165
|
+
</pre>
|
166
|
+
|
106
167
|
<h1>Usage</h1>
|
107
168
|
|
108
169
|
<p><strong> For System Mail: </strong></p>
|
@@ -143,6 +204,13 @@ MailEngine::MailDispatcher.marketing mail template name(:to => "Michael he <a hr
|
|
143
204
|
|
144
205
|
<p>Currently only support above rails3.</p>
|
145
206
|
|
207
|
+
<h1>Tips</h1>
|
208
|
+
|
209
|
+
<p>Use below rake task, you can export local mail engine data, then import to production environment.</p>
|
210
|
+
|
211
|
+
<pre class="code"><span class='rake identifier id'>rake</span> <span class='mail_engine identifier id'>mail_engine</span><span class='symbol val'>:export_mail_engine_database</span>
|
212
|
+
</pre>
|
213
|
+
|
146
214
|
<h1>Screenshots</h1>
|
147
215
|
|
148
216
|
<h2>Dashboard</h2>
|
@@ -203,7 +271,7 @@ MailEngine::MailDispatcher.marketing mail template name(:to => "Michael he <a hr
|
|
203
271
|
<li>Sending Period.</li>
|
204
272
|
<li>Payloads which load from user model and send to template when sending.</li>
|
205
273
|
<li>First send date time, this date will indicate when this mail will be send first time, and according to the seding period it will resend at the same time after one period.</li>
|
206
|
-
<li>You can
|
274
|
+
<li>You can control if run the schedule or not.</li>
|
207
275
|
</ol>
|
208
276
|
|
209
277
|
|
@@ -226,7 +294,7 @@ MailEngine::MailDispatcher.marketing mail template name(:to => "Michael he <a hr
|
|
226
294
|
<p><img src="https://github.com/hlxwell/mail-engine/raw/master/screenshots/bounce_report.png" title="Bounce Report" alt="Bounce Report" /></p></div></div>
|
227
295
|
|
228
296
|
<div id="footer">
|
229
|
-
Generated on
|
297
|
+
Generated on Mon Mar 14 22:31:43 2011 by
|
230
298
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
231
299
|
0.6.4 (ruby-1.8.7).
|
232
300
|
</div>
|
data/doc/index.html
CHANGED
@@ -97,12 +97,73 @@ to fit our needs in real project:</p>
|
|
97
97
|
|
98
98
|
<p><strong> Step 4: </strong></p>
|
99
99
|
|
100
|
+
<p>Add acts<em>as</em>mail_receiver definition to "Your User" model.</p>
|
101
|
+
|
102
|
+
<pre class="code"><span class='class class kw'>class</span> <span class='User constant id'>User</span> <span class='lt op'><</span> <span class='AR constant id'>AR</span>
|
103
|
+
<span class='acts_as_mail_receiver identifier id'>acts_as_mail_receiver</span> <span class='symbol val'>:payload_columns</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='dstring node'>%w{firstname lastname}</span><span class='comma token'>,</span>
|
104
|
+
<span class='symbol val'>:groups</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='dstring node'>%w{all english_users chinese_users}</span>
|
105
|
+
<span class='end end kw'>end</span>
|
106
|
+
</pre>
|
107
|
+
|
108
|
+
<ol>
|
109
|
+
<li> User model must have 'email' and payload specified columns, or else you can delegate to other model.</li>
|
110
|
+
<li> "acts<em>as</em>mail_receiver" statement has to place below the scope statements.</li>
|
111
|
+
</ol>
|
112
|
+
|
113
|
+
|
114
|
+
<p><strong> Step 5: </strong></p>
|
115
|
+
|
116
|
+
<p>Add sendgrid smtp api configure:</p>
|
117
|
+
|
118
|
+
<pre class="code"><span class='class class kw'>class</span> <span class='UserMailer constant id'>UserMailer</span> <span class='lt op'><</span> <span class='ActionMailer constant id'>ActionMailer</span><span class='colon2 op'>::</span><span class='Base constant id'>Base</span>
|
119
|
+
<span class='sendgrid_header identifier id'>sendgrid_header</span> <span class='do do kw'>do</span>
|
120
|
+
<span class='category identifier id'>category</span> <span class='string val'>"xxx"</span>
|
121
|
+
|
122
|
+
<span class='filters identifier id'>filters</span> <span class='lbrace token'>{</span>
|
123
|
+
<span class='opentrack identifier id'>opentrack</span> <span class='string val'>"enable"</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='integer val'>1</span>
|
124
|
+
<span class='clicktrack identifier id'>clicktrack</span> <span class='string val'>"enable"</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='integer val'>1</span>
|
125
|
+
<span class='subscriptiontrack identifier id'>subscriptiontrack</span> <span class='string val'>"enable"</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='integer val'>0</span>
|
126
|
+
<span class='template identifier id'>template</span> <span class='string val'>"enable"</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='integer val'>0</span>
|
127
|
+
<span class='footer identifier id'>footer</span> <span class='string val'>"enable"</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='integer val'>0</span>
|
128
|
+
<span class='rbrace token'>}</span>
|
129
|
+
<span class='end end kw'>end</span>
|
130
|
+
<span class='end end kw'>end</span>
|
131
|
+
</pre>
|
132
|
+
|
133
|
+
<p>For the detail information please check sendgrid.com.</p>
|
134
|
+
|
135
|
+
<p><strong> Step 6: </strong></p>
|
136
|
+
|
137
|
+
<p>Add below line to production.rb or development.rb for specifing the host.
|
138
|
+
it will used when generate resource url when upload zip file.</p>
|
139
|
+
|
140
|
+
<pre class="code"><span class='config identifier id'>config</span><span class='dot token'>.</span><span class='action_mailer identifier id'>action_mailer</span><span class='dot token'>.</span><span class='default_url_options identifier id'>default_url_options</span> <span class='assign token'>=</span> <span class='lbrace token'>{</span> <span class='symbol val'>:host</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='string val'>"lvh.me:3000"</span> <span class='rbrace token'>}</span>
|
141
|
+
</pre>
|
142
|
+
|
143
|
+
<p><strong> Step 7: </strong></p>
|
144
|
+
|
100
145
|
<p>Add below line to the crontab list of your sever:</p>
|
101
146
|
|
102
147
|
<pre class="code"><span class='comment val'>### check mail schedule for every 15 minutes ###</span>
|
103
148
|
<span class='mult op'>*</span><span class='regexp val'>/4 * * * * sh -c "cd /</span><span class='path identifier id'>path</span><span class='div op'>/</span><span class='to identifier id'>to</span><span class='div op'>/</span><span class='your identifier id'>your</span><span class='div op'>/</span><span class='system identifier id'>system</span> <span class='andop op'>&&</span> <span class='rake identifier id'>rake</span> <span class='mail_engine identifier id'>mail_engine</span><span class='symbol val'>:sendmail</span> <span class='RAILS_ENV constant id'>RAILS_ENV</span><span class='assign token'>=</span><span class='production identifier id'>production</span><span class='string val'>"
|
104
149
|
</span></pre>
|
105
150
|
|
151
|
+
<h1>Configuration</h1>
|
152
|
+
|
153
|
+
<p>Below is the config for development env.</p>
|
154
|
+
|
155
|
+
<pre class="code"><span class='development identifier id'>development</span><span class='colon op'>:</span>
|
156
|
+
<span class='log_mail identifier id'>log_mail</span><span class='colon op'>:</span> <span class='false false kw'>false</span> <span class='comment val'># if you want to enable the mail log, set true.</span>
|
157
|
+
<span class='user_class_name identifier id'>user_class_name</span><span class='colon op'>:</span> <span class='string val'>"User"</span> <span class='comment val'># Specify the User model in your system, which will used for mail schedule feature to find user groups and payloads.</span>
|
158
|
+
<span class='mount_at identifier id'>mount_at</span><span class='colon op'>:</span> <span class='string val'>"/admin/mail_engine"</span> <span class='comment val'># set the url path for mail engine.</span>
|
159
|
+
<span class='access_check_method identifier id'>access_check_method</span><span class='colon op'>:</span> <span class='string val'>"logged_in?"</span> <span class='comment val'># set a method name which will execute before each page action in mail engine.</span>
|
160
|
+
<span class='replacement_email identifier id'>replacement_email</span><span class='colon op'>:</span> <span class='string val'>"dev@youdomain.com"</span> <span class='comment val'># if you want to send all mail to one email, like on staging server or development environment, you can set this, or else don't set it.</span>
|
161
|
+
<span class='sendgrid identifier id'>sendgrid</span><span class='colon op'>:</span> <span class='comment val'># Below you need to set the sendgrid account info.</span>
|
162
|
+
<span class='sendgrid_user identifier id'>sendgrid_user</span><span class='colon op'>:</span> <span class='string val'>"you send grid username"</span> <span class='comment val'># </span>
|
163
|
+
<span class='sendgrid_key identifier id'>sendgrid_key</span><span class='colon op'>:</span> <span class='string val'>"password"</span> <span class='comment val'># </span>
|
164
|
+
<span class='sendgrid_category identifier id'>sendgrid_category</span><span class='colon op'>:</span> <span class='string val'>"my sendgrid category"</span> <span class='comment val'># </span>
|
165
|
+
</pre>
|
166
|
+
|
106
167
|
<h1>Usage</h1>
|
107
168
|
|
108
169
|
<p><strong> For System Mail: </strong></p>
|
@@ -143,6 +204,13 @@ MailEngine::MailDispatcher.marketing mail template name(:to => "Michael he <a hr
|
|
143
204
|
|
144
205
|
<p>Currently only support above rails3.</p>
|
145
206
|
|
207
|
+
<h1>Tips</h1>
|
208
|
+
|
209
|
+
<p>Use below rake task, you can export local mail engine data, then import to production environment.</p>
|
210
|
+
|
211
|
+
<pre class="code"><span class='rake identifier id'>rake</span> <span class='mail_engine identifier id'>mail_engine</span><span class='symbol val'>:export_mail_engine_database</span>
|
212
|
+
</pre>
|
213
|
+
|
146
214
|
<h1>Screenshots</h1>
|
147
215
|
|
148
216
|
<h2>Dashboard</h2>
|
@@ -203,7 +271,7 @@ MailEngine::MailDispatcher.marketing mail template name(:to => "Michael he <a hr
|
|
203
271
|
<li>Sending Period.</li>
|
204
272
|
<li>Payloads which load from user model and send to template when sending.</li>
|
205
273
|
<li>First send date time, this date will indicate when this mail will be send first time, and according to the seding period it will resend at the same time after one period.</li>
|
206
|
-
<li>You can
|
274
|
+
<li>You can control if run the schedule or not.</li>
|
207
275
|
</ol>
|
208
276
|
|
209
277
|
|
@@ -226,7 +294,7 @@ MailEngine::MailDispatcher.marketing mail template name(:to => "Michael he <a hr
|
|
226
294
|
<p><img src="https://github.com/hlxwell/mail-engine/raw/master/screenshots/bounce_report.png" title="Bounce Report" alt="Bounce Report" /></p></div></div>
|
227
295
|
|
228
296
|
<div id="footer">
|
229
|
-
Generated on
|
297
|
+
Generated on Mon Mar 14 22:31:43 2011 by
|
230
298
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
231
299
|
0.6.4 (ruby-1.8.7).
|
232
300
|
</div>
|