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.
Files changed (125) hide show
  1. data/.yardoc/checksums +9 -7
  2. data/.yardoc/objects/ActionMailer/Base/collect_responses_and_parts_order_i.dat +0 -0
  3. data/.yardoc/objects/ActionMailer/Base/mail_i.dat +0 -0
  4. data/.yardoc/objects/ActionMailer/Base/origin_mail_i.dat +0 -0
  5. data/.yardoc/objects/ActionMailer/Base/set_layout_and_partials_i.dat +0 -0
  6. data/.yardoc/objects/ActionMailer/Base.dat +0 -0
  7. data/.yardoc/objects/ActionMailer/Collector/custom_i.dat +0 -0
  8. data/.yardoc/objects/ActionMailer/Collector.dat +0 -0
  9. data/.yardoc/objects/ActionMailer.dat +0 -0
  10. data/.yardoc/objects/LiquidView/PROTECTED_ASSIGNS.dat +0 -0
  11. data/.yardoc/objects/LiquidView/PROTECTED_INSTANCE_VARIABLES.dat +0 -0
  12. data/.yardoc/objects/LiquidView/call_c.dat +0 -0
  13. data/.yardoc/objects/LiquidView/compilable_3F_i.dat +0 -0
  14. data/.yardoc/objects/LiquidView/initialize_i.dat +0 -0
  15. data/.yardoc/objects/LiquidView/render_i.dat +0 -0
  16. data/.yardoc/objects/LiquidView.dat +0 -0
  17. data/.yardoc/objects/MailEngine/ActsAsMailReceiver/ClassMethods/acts_as_mail_receiver_i.dat +0 -0
  18. data/.yardoc/objects/MailEngine/ActsAsMailReceiver/ClassMethods/check_method_existance_21_i.dat +0 -0
  19. data/.yardoc/objects/MailEngine/ActsAsMailReceiver/ClassMethods.dat +0 -0
  20. data/.yardoc/objects/MailEngine/ActsAsMailReceiver.dat +0 -0
  21. data/.yardoc/objects/MailEngine/Base/_40_40configurations.dat +0 -0
  22. data/.yardoc/objects/MailEngine/Base/current_config_c.dat +0 -0
  23. data/.yardoc/objects/MailEngine/Base/send_marketing_mail_c.dat +0 -0
  24. data/.yardoc/objects/MailEngine/Base.dat +0 -0
  25. data/.yardoc/objects/MailEngine/Configuration/load_c.dat +0 -0
  26. data/.yardoc/objects/MailEngine/Configuration.dat +0 -0
  27. data/.yardoc/objects/MailEngine/CopyMigrations/copy_migrations_i.dat +0 -0
  28. data/.yardoc/objects/MailEngine/CopyMigrations.dat +0 -0
  29. data/.yardoc/objects/MailEngine/CopyResources/copy_resources_i.dat +0 -0
  30. data/.yardoc/objects/MailEngine/CopyResources.dat +0 -0
  31. data/.yardoc/objects/MailEngine/CreateConfig/create_config_file_i.dat +0 -0
  32. data/.yardoc/objects/MailEngine/CreateConfig.dat +0 -0
  33. data/.yardoc/objects/MailEngine/Engine.dat +0 -0
  34. data/.yardoc/objects/MailEngine/HtmlDocumentAssetsReplacer/check_21_c.dat +0 -0
  35. data/.yardoc/objects/MailEngine/HtmlDocumentAssetsReplacer/get_resource_url_c.dat +0 -0
  36. data/.yardoc/objects/MailEngine/HtmlDocumentAssetsReplacer/process_c.dat +0 -0
  37. data/.yardoc/objects/MailEngine/HtmlDocumentAssetsReplacer/replace_resource_in_html_c.dat +0 -0
  38. data/.yardoc/objects/MailEngine/HtmlDocumentAssetsReplacer.dat +0 -0
  39. data/.yardoc/objects/MailEngine/Install/copy_migrations_i.dat +0 -0
  40. data/.yardoc/objects/MailEngine/Install/copy_resources_i.dat +0 -0
  41. data/.yardoc/objects/MailEngine/Install/create_config_i.dat +0 -0
  42. data/.yardoc/objects/MailEngine/Install.dat +0 -0
  43. data/.yardoc/objects/MailEngine/MailLogSubscriber/deliver_i.dat +0 -0
  44. data/.yardoc/objects/MailEngine/MailLogSubscriber.dat +0 -0
  45. data/.yardoc/objects/MailEngine/MailTemplateResolver/find_templates_i.dat +0 -0
  46. data/.yardoc/objects/MailEngine/MailTemplateResolver/initialize_template_i.dat +0 -0
  47. data/.yardoc/objects/MailEngine/MailTemplateResolver/normalize_array_i.dat +0 -0
  48. data/.yardoc/objects/MailEngine/MailTemplateResolver/normalize_path_i.dat +0 -0
  49. data/.yardoc/objects/MailEngine/MailTemplateResolver/virtual_path_i.dat +0 -0
  50. data/.yardoc/objects/MailEngine/MailTemplateResolver.dat +0 -0
  51. data/.yardoc/objects/MailEngine/PLACEHOLDERS_IN_LAYOUT.dat +0 -0
  52. data/.yardoc/objects/MailEngine/Sendgrid/Base/ClassMethods/sendgrid_header_i.dat +0 -0
  53. data/.yardoc/objects/MailEngine/Sendgrid/Base/ClassMethods.dat +0 -0
  54. data/.yardoc/objects/MailEngine/Sendgrid/Base/InstanceMethods.dat +0 -0
  55. data/.yardoc/objects/MailEngine/Sendgrid/Base.dat +0 -0
  56. data/.yardoc/objects/MailEngine/Sendgrid/FilterSetting/data_3D_i.dat +0 -0
  57. data/.yardoc/objects/MailEngine/Sendgrid/FilterSetting/data_i.dat +0 -0
  58. data/.yardoc/objects/MailEngine/Sendgrid/FilterSetting/initialize_i.dat +0 -0
  59. data/.yardoc/objects/MailEngine/Sendgrid/FilterSetting/validate_config_21_i.dat +0 -0
  60. data/.yardoc/objects/MailEngine/Sendgrid/FilterSetting.dat +0 -0
  61. data/.yardoc/objects/MailEngine/Sendgrid/RestApi/blocks_c.dat +0 -0
  62. data/.yardoc/objects/MailEngine/Sendgrid/RestApi/bounces_c.dat +0 -0
  63. data/.yardoc/objects/MailEngine/Sendgrid/RestApi/invalidemails_c.dat +0 -0
  64. data/.yardoc/objects/MailEngine/Sendgrid/RestApi/spamreports_c.dat +0 -0
  65. data/.yardoc/objects/MailEngine/Sendgrid/RestApi/stats_c.dat +0 -0
  66. data/.yardoc/objects/MailEngine/Sendgrid/RestApi.dat +0 -0
  67. data/.yardoc/objects/MailEngine/Sendgrid/RestApiError.dat +0 -0
  68. data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi/add_sub_val_i.dat +0 -0
  69. data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi/add_to_i.dat +0 -0
  70. data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi/category_i.dat +0 -0
  71. data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi/filters_i.dat +0 -0
  72. data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi/initialize_i.dat +0 -0
  73. data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi/set_send_to_i.dat +0 -0
  74. data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi/set_unique_args_i.dat +0 -0
  75. data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi/to_hash_i.dat +0 -0
  76. data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi/to_json_i.dat +0 -0
  77. data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi/to_s_i.dat +0 -0
  78. data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi.dat +0 -0
  79. data/.yardoc/objects/MailEngine/Sendgrid.dat +0 -0
  80. data/.yardoc/objects/MailEngine/VERSION.dat +0 -0
  81. data/.yardoc/objects/MailEngine/ZipProcessor/extract_all_files_c.dat +0 -0
  82. data/.yardoc/objects/MailEngine/ZipProcessor.dat +0 -0
  83. data/.yardoc/objects/MailEngine.dat +0 -0
  84. data/.yardoc/objects/root.dat +0 -0
  85. data/.yardoc/proxy_types +0 -0
  86. data/Gemfile +0 -1
  87. data/VERSION +1 -1
  88. data/app/controllers/mail_engine/application_controller.rb +0 -2
  89. data/doc/ActionMailer/Base.html +48 -4
  90. data/doc/ActionMailer/Collector.html +11 -11
  91. data/doc/ActionMailer.html +1 -1
  92. data/doc/LiquidView.html +453 -0
  93. data/doc/MailEngine/ActsAsMailReceiver/ClassMethods.html +1 -1
  94. data/doc/MailEngine/ActsAsMailReceiver.html +1 -1
  95. data/doc/MailEngine/Base.html +14 -12
  96. data/doc/MailEngine/Configuration.html +1 -1
  97. data/doc/MailEngine/CopyMigrations.html +1 -1
  98. data/doc/MailEngine/CopyResources.html +1 -1
  99. data/doc/MailEngine/CreateConfig.html +1 -1
  100. data/doc/MailEngine/Engine.html +1 -1
  101. data/doc/MailEngine/HtmlDocumentAssetsReplacer.html +1 -1
  102. data/doc/MailEngine/Install.html +1 -1
  103. data/doc/MailEngine/MailLogSubscriber.html +1 -1
  104. data/doc/MailEngine/MailTemplateResolver.html +502 -0
  105. data/doc/MailEngine/Sendgrid/Base/ClassMethods.html +1 -1
  106. data/doc/MailEngine/Sendgrid/Base/InstanceMethods.html +1 -1
  107. data/doc/MailEngine/Sendgrid/Base.html +1 -1
  108. data/doc/MailEngine/Sendgrid/FilterSetting.html +1 -1
  109. data/doc/MailEngine/Sendgrid/RestApi.html +1 -1
  110. data/doc/MailEngine/Sendgrid/RestApiError.html +1 -1
  111. data/doc/MailEngine/Sendgrid/SmtpApi.html +99 -30
  112. data/doc/MailEngine/Sendgrid.html +1 -1
  113. data/doc/MailEngine/ZipProcessor.html +1 -1
  114. data/doc/MailEngine.html +3 -3
  115. data/doc/_index.html +25 -5
  116. data/doc/class_list.html +1 -1
  117. data/doc/file.README.html +70 -2
  118. data/doc/index.html +70 -2
  119. data/doc/method_list.html +88 -8
  120. data/doc/top-level-namespace.html +3 -1
  121. data/lib/mail_engine/action_mailer_patch.rb +2 -2
  122. data/lib/mail_engine/engine.rb +3 -7
  123. data/mail_engine.gemspec +18 -5
  124. data/test/functional/user_mailer_test.rb +2 -5
  125. 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
- 63
365
- 64
366
- 65
367
- 66</pre>
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 63</span>
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='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='Array constant id'>Array</span><span class='rparen token'>)</span> <span class='question op'>?</span> <span class='var identifier id'>var</span> <span class='colon op'>:</span> <span class='lbrack token'>[</span><span class='var identifier id'>var</span><span class='rbrack token'>]</span>
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
- 57
396
- 58
397
- 59
398
- 60
399
- 61</pre>
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 57</span>
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='to identifier id'>to</span><span class='dot token'>.</span><span class='kind_of? fid id'>kind_of?</span><span class='lparen token'>(</span><span class='Array constant id'>Array</span><span class='rparen token'>)</span> <span class='question op'>?</span> <span class='to identifier id'>to</span> <span class='colon op'>:</span> <span class='lbrack token'>[</span><span class='to identifier id'>to</span><span class='rbrack token'>]</span>
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&#8217;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
- 68
491
- 69
492
- 70</pre>
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 68</span>
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
- 76
520
- 77
521
- 78</pre>
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 76</span>
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'>&gt;</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
- 72
549
- 73
550
- 74</pre>
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 72</span>
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'>/([&quot;\]}])([,:])([&quot;\[{])/</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
- 80
578
- 81
579
- 82</pre>
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 80</span>
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 Fri Mar 4 17:56:25 2011 by
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>
@@ -92,7 +92,7 @@
92
92
  </div>
93
93
 
94
94
  <div id="footer">
95
- Generated on Fri Mar 4 17:56:25 2011 by
95
+ Generated on Mon Mar 14 22:31:44 2011 by
96
96
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
97
97
  0.6.4 (ruby-1.8.7).
98
98
  </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 Fri Mar 4 17:56:25 2011 by
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 Fri Mar 4 17:56:25 2011 by
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="MailEngine/Sendgrid/Base.html" title="MailEngine::Sendgrid::Base (module)">Base</a></span>
95
+ <span class='object_link'><a href="ActionMailer/Base.html" title="ActionMailer::Base (class)">Base</a></span>
96
96
 
97
- <small>(MailEngine::Sendgrid)</small>
97
+ <small>(ActionMailer)</small>
98
98
 
99
99
  </li>
100
100
 
101
101
  <li>
102
- <span class='object_link'><a href="ActionMailer/Base.html" title="ActionMailer::Base (class)">Base</a></span>
102
+ <span class='object_link'><a href="MailEngine/Sendgrid/Base.html" title="MailEngine::Sendgrid::Base (module)">Base</a></span>
103
103
 
104
- <small>(ActionMailer)</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 Fri Mar 4 17:56:24 2011 by
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> &lt; 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> &lt; 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> &lt; 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> &lt; 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> &lt; 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> &lt; 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> &lt; 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> &lt; 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> &lt; 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> &lt; 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> &lt; 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> &lt; 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> &lt; 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> &lt; 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> &lt; 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> &lt; 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> &lt; 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> &lt; Object<small class='search_info'>ActionMailer</small></li></ul><li><span class='object_link'><a href="LiquidView.html" title="LiquidView (class)">LiquidView</a></span> &lt; 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> &lt; 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> &lt; 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> &lt; 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> &lt; 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> &lt; 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> &lt; 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> &lt; 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> &lt; 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> &lt; 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> &lt; 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> &lt; 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> &lt; 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> &lt; 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> &lt; 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> &lt; 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'>&lt;</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'>&gt;</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'>&gt;</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'>&lt;</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'>&quot;xxx&quot;</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'>&quot;enable&quot;</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='integer val'>1</span>
124
+ <span class='clicktrack identifier id'>clicktrack</span> <span class='string val'>&quot;enable&quot;</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='integer val'>1</span>
125
+ <span class='subscriptiontrack identifier id'>subscriptiontrack</span> <span class='string val'>&quot;enable&quot;</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='integer val'>0</span>
126
+ <span class='template identifier id'>template</span> <span class='string val'>&quot;enable&quot;</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='integer val'>0</span>
127
+ <span class='footer identifier id'>footer</span> <span class='string val'>&quot;enable&quot;</span> <span class='assign token'>=</span><span class='gt op'>&gt;</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'>&gt;</span> <span class='string val'>&quot;lvh.me:3000&quot;</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 &quot;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'>&amp;&amp;</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'>&quot;
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'>&quot;User&quot;</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'>&quot;/admin/mail_engine&quot;</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'>&quot;logged_in?&quot;</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'>&quot;dev@youdomain.com&quot;</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'>&quot;you send grid username&quot;</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'>&quot;password&quot;</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'>&quot;my sendgrid category&quot;</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 set requirements, which been predefined in the system, let the mail not been sent if the requirements is unreached.</li>
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 Fri Mar 4 17:56:24 2011 by
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'>&lt;</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'>&gt;</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'>&gt;</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'>&lt;</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'>&quot;xxx&quot;</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'>&quot;enable&quot;</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='integer val'>1</span>
124
+ <span class='clicktrack identifier id'>clicktrack</span> <span class='string val'>&quot;enable&quot;</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='integer val'>1</span>
125
+ <span class='subscriptiontrack identifier id'>subscriptiontrack</span> <span class='string val'>&quot;enable&quot;</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='integer val'>0</span>
126
+ <span class='template identifier id'>template</span> <span class='string val'>&quot;enable&quot;</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='integer val'>0</span>
127
+ <span class='footer identifier id'>footer</span> <span class='string val'>&quot;enable&quot;</span> <span class='assign token'>=</span><span class='gt op'>&gt;</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'>&gt;</span> <span class='string val'>&quot;lvh.me:3000&quot;</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 &quot;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'>&amp;&amp;</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'>&quot;
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'>&quot;User&quot;</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'>&quot;/admin/mail_engine&quot;</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'>&quot;logged_in?&quot;</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'>&quot;dev@youdomain.com&quot;</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'>&quot;you send grid username&quot;</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'>&quot;password&quot;</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'>&quot;my sendgrid category&quot;</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 set requirements, which been predefined in the system, let the mail not been sent if the requirements is unreached.</li>
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 Fri Mar 4 17:56:24 2011 by
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>