actionmailer-rack-upgrade-2 2.3.15
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +387 -0
- data/MIT-LICENSE +21 -0
- data/README +149 -0
- data/Rakefile +97 -0
- data/install.rb +30 -0
- data/lib/action_mailer/adv_attr_accessor.rb +30 -0
- data/lib/action_mailer/base.rb +739 -0
- data/lib/action_mailer/helpers.rb +113 -0
- data/lib/action_mailer/mail_helper.rb +17 -0
- data/lib/action_mailer/part.rb +107 -0
- data/lib/action_mailer/part_container.rb +55 -0
- data/lib/action_mailer/quoting.rb +62 -0
- data/lib/action_mailer/test_case.rb +64 -0
- data/lib/action_mailer/test_helper.rb +68 -0
- data/lib/action_mailer/utils.rb +7 -0
- data/lib/action_mailer/vendor/text-format-0.6.3/text/format.rb +1466 -0
- data/lib/action_mailer/vendor/text_format.rb +10 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/Makefile +18 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/address.rb +392 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/attachments.rb +65 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/base64.rb +46 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/compat.rb +41 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/config.rb +67 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/core_extensions.rb +63 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/encode.rb +590 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/header.rb +962 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/index.rb +9 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/interface.rb +1162 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/loader.rb +3 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/mail.rb +578 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/mailbox.rb +496 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/main.rb +6 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/mbox.rb +3 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/net.rb +250 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/obsolete.rb +132 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/parser.rb +1060 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/parser.y +416 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/port.rb +379 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/quoting.rb +164 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/require_arch.rb +58 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/scanner.rb +49 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/scanner_r.rb +262 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/stringio.rb +280 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/utils.rb +362 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/COPYING +504 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/README +12 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/big5freq.rb +927 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/big5prober.rb +42 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/chardistribution.rb +238 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/charsetgroupprober.rb +112 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/charsetprober.rb +75 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/codingstatemachine.rb +64 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/constants.rb +42 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/escprober.rb +89 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/escsm.rb +244 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/eucjpprober.rb +88 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/euckrfreq.rb +596 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/euckrprober.rb +42 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/euctwfreq.rb +430 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/euctwprober.rb +42 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/gb2312freq.rb +474 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/gb2312prober.rb +42 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/hebrewprober.rb +289 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/jisfreq.rb +570 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/jpcntx.rb +229 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langbulgarianmodel.rb +229 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langcyrillicmodel.rb +330 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langgreekmodel.rb +227 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langhebrewmodel.rb +202 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langhungarianmodel.rb +226 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langthaimodel.rb +201 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/latin1prober.rb +147 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/mbcharsetprober.rb +89 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/mbcsgroupprober.rb +45 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/mbcssm.rb +542 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/sbcharsetprober.rb +124 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/sbcsgroupprober.rb +56 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/sjisprober.rb +88 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/universaldetector.rb +168 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/utf8prober.rb +87 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet.rb +67 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/version.rb +39 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail.rb +6 -0
- data/lib/action_mailer/vendor/tmail.rb +17 -0
- data/lib/action_mailer/version.rb +9 -0
- data/lib/action_mailer.rb +62 -0
- data/lib/actionmailer.rb +2 -0
- data/test/abstract_unit.rb +62 -0
- data/test/asset_host_test.rb +54 -0
- data/test/delivery_method_test.rb +51 -0
- data/test/fixtures/asset_host_mailer/email_with_asset.html.erb +1 -0
- data/test/fixtures/auto_layout_mailer/hello.html.erb +1 -0
- data/test/fixtures/auto_layout_mailer/multipart.text.html.erb +1 -0
- data/test/fixtures/auto_layout_mailer/multipart.text.plain.erb +1 -0
- data/test/fixtures/explicit_layout_mailer/logout.html.erb +1 -0
- data/test/fixtures/explicit_layout_mailer/signup.html.erb +1 -0
- data/test/fixtures/first_mailer/share.erb +1 -0
- data/test/fixtures/helper_mailer/use_example_helper.erb +1 -0
- data/test/fixtures/helper_mailer/use_helper.erb +1 -0
- data/test/fixtures/helper_mailer/use_helper_method.erb +1 -0
- data/test/fixtures/helper_mailer/use_mail_helper.erb +5 -0
- data/test/fixtures/helpers/example_helper.rb +5 -0
- data/test/fixtures/layouts/auto_layout_mailer.html.erb +1 -0
- data/test/fixtures/layouts/auto_layout_mailer.text.erb +1 -0
- data/test/fixtures/layouts/spam.html.erb +1 -0
- data/test/fixtures/path.with.dots/funky_path_mailer/multipart_with_template_path_with_dots.erb +1 -0
- data/test/fixtures/raw_email +14 -0
- data/test/fixtures/raw_email10 +20 -0
- data/test/fixtures/raw_email12 +32 -0
- data/test/fixtures/raw_email13 +29 -0
- data/test/fixtures/raw_email2 +114 -0
- data/test/fixtures/raw_email3 +70 -0
- data/test/fixtures/raw_email4 +59 -0
- data/test/fixtures/raw_email5 +19 -0
- data/test/fixtures/raw_email6 +20 -0
- data/test/fixtures/raw_email7 +66 -0
- data/test/fixtures/raw_email8 +47 -0
- data/test/fixtures/raw_email9 +28 -0
- data/test/fixtures/raw_email_quoted_with_0d0a +14 -0
- data/test/fixtures/raw_email_with_invalid_characters_in_content_type +104 -0
- data/test/fixtures/raw_email_with_nested_attachment +100 -0
- data/test/fixtures/raw_email_with_partially_quoted_subject +14 -0
- data/test/fixtures/second_mailer/share.erb +1 -0
- data/test/fixtures/templates/signed_up.erb +3 -0
- data/test/fixtures/test_mailer/_subtemplate.text.plain.erb +1 -0
- data/test/fixtures/test_mailer/body_ivar.erb +2 -0
- data/test/fixtures/test_mailer/custom_templating_extension.text.html.haml +6 -0
- data/test/fixtures/test_mailer/custom_templating_extension.text.plain.haml +6 -0
- data/test/fixtures/test_mailer/implicitly_multipart_example.ignored.erb +1 -0
- data/test/fixtures/test_mailer/implicitly_multipart_example.rhtml.bak +1 -0
- data/test/fixtures/test_mailer/implicitly_multipart_example.text.html.erb +10 -0
- data/test/fixtures/test_mailer/implicitly_multipart_example.text.html.erb~ +10 -0
- data/test/fixtures/test_mailer/implicitly_multipart_example.text.plain.erb +2 -0
- data/test/fixtures/test_mailer/implicitly_multipart_example.text.yaml.erb +1 -0
- data/test/fixtures/test_mailer/included_subtemplate.text.plain.erb +1 -0
- data/test/fixtures/test_mailer/rxml_template.builder +2 -0
- data/test/fixtures/test_mailer/rxml_template.rxml +2 -0
- data/test/fixtures/test_mailer/signed_up.html.erb +3 -0
- data/test/fixtures/test_mailer/signed_up_with_url.erb +5 -0
- data/test/mail_helper_test.rb +95 -0
- data/test/mail_layout_test.rb +123 -0
- data/test/mail_render_test.rb +116 -0
- data/test/mail_service_test.rb +1145 -0
- data/test/quoting_test.rb +105 -0
- data/test/test_helper_test.rb +129 -0
- data/test/tmail_test.rb +22 -0
- data/test/url_test.rb +76 -0
- metadata +209 -0
@@ -0,0 +1,28 @@
|
|
1
|
+
Received: from xxx.xxx.xxx ([xxx.xxx.xxx.xxx] verified)
|
2
|
+
by xxx.com (CommuniGate Pro SMTP 4.2.8)
|
3
|
+
with SMTP id 2532598 for xxx@xxx.com; Wed, 23 Feb 2005 17:51:49 -0500
|
4
|
+
Received-SPF: softfail
|
5
|
+
receiver=xxx.com; client-ip=xxx.xxx.xxx.xxx; envelope-from=xxx@xxx.xxx
|
6
|
+
quite Delivered-To: xxx@xxx.xxx
|
7
|
+
Received: by xxx.xxx.xxx (Wostfix, from userid xxx)
|
8
|
+
id 0F87F333; Wed, 23 Feb 2005 16:16:17 -0600
|
9
|
+
Date: Wed, 23 Feb 2005 18:20:17 -0400
|
10
|
+
From: "xxx xxx" <xxx@xxx.xxx>
|
11
|
+
Message-ID: <4D6AA7EB.6490534@xxx.xxx>
|
12
|
+
To: xxx@xxx.com
|
13
|
+
Subject: Stop adware/spyware once and for all.
|
14
|
+
X-Scanned-By: MIMEDefang 2.11 (www dot roaringpenguin dot com slash mimedefang)
|
15
|
+
|
16
|
+
You are infected with:
|
17
|
+
Ad Ware and Spy Ware
|
18
|
+
|
19
|
+
Get your free scan and removal download now,
|
20
|
+
before it gets any worse.
|
21
|
+
|
22
|
+
http://xxx.xxx.info?aid=3D13&?stat=3D4327kdzt
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
no more? (you will still be infected)
|
28
|
+
http://xxx.xxx.info/discon/?xxx@xxx.com
|
@@ -0,0 +1,14 @@
|
|
1
|
+
Mime-Version: 1.0 (Apple Message framework v730)
|
2
|
+
Message-Id: <9169D984-4E0B-45EF-82D4-8F5E53AD7012@example.com>
|
3
|
+
From: foo@example.com
|
4
|
+
Subject: testing
|
5
|
+
Date: Mon, 6 Jun 2005 22:21:22 +0200
|
6
|
+
To: blah@example.com
|
7
|
+
Content-Transfer-Encoding: quoted-printable
|
8
|
+
Content-Type: text/plain
|
9
|
+
|
10
|
+
A fax has arrived from remote ID ''.=0D=0A-----------------------=
|
11
|
+
-------------------------------------=0D=0ATime: 3/9/2006 3:50:52=
|
12
|
+
PM=0D=0AReceived from remote ID: =0D=0AInbound user ID XXXXXXXXXX, r=
|
13
|
+
outing code XXXXXXXXX=0D=0AResult: (0/352;0/0) Successful Send=0D=0AP=
|
14
|
+
age record: 1 - 1=0D=0AElapsed time: 00:58 on channel 11=0D=0A
|
@@ -0,0 +1,104 @@
|
|
1
|
+
Return-Path: <mikel.other@baci>
|
2
|
+
Received: from some.isp.com by baci with ESMTP id 632BD5758 for <mikel.lindsaar@baci>; Sun, 21 Oct 2007 19:38:21 +1000
|
3
|
+
Date: Sun, 21 Oct 2007 19:38:13 +1000
|
4
|
+
From: Mikel Lindsaar <mikel.other@baci>
|
5
|
+
Reply-To: Mikel Lindsaar <mikel.other@baci>
|
6
|
+
To: mikel.lindsaar@baci
|
7
|
+
Message-Id: <009601c813c6$19df3510$0437d30a@mikel091a>
|
8
|
+
Subject: Testing outlook
|
9
|
+
Mime-Version: 1.0
|
10
|
+
Content-Type: multipart/alternative; boundary=----=_NextPart_000_0093_01C81419.EB75E850
|
11
|
+
Delivered-To: mikel.lindsaar@baci
|
12
|
+
X-Mimeole: Produced By Microsoft MimeOLE V6.00.2900.3138
|
13
|
+
X-Msmail-Priority: Normal
|
14
|
+
|
15
|
+
This is a multi-part message in MIME format.
|
16
|
+
|
17
|
+
|
18
|
+
------=_NextPart_000_0093_01C81419.EB75E850
|
19
|
+
Content-Type: text/plain; charset=iso-8859-1
|
20
|
+
Content-Transfer-Encoding: Quoted-printable
|
21
|
+
|
22
|
+
Hello
|
23
|
+
This is an outlook test
|
24
|
+
|
25
|
+
So there.
|
26
|
+
|
27
|
+
Me.
|
28
|
+
|
29
|
+
------=_NextPart_000_0093_01C81419.EB75E850
|
30
|
+
Content-Type: text/html; charset=iso-8859-1
|
31
|
+
Content-Transfer-Encoding: Quoted-printable
|
32
|
+
|
33
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
34
|
+
<HTML><HEAD>
|
35
|
+
<META http-equiv=3DContent-Type content=3D"text/html; =
|
36
|
+
charset=3Diso-8859-1">
|
37
|
+
<META content=3D"MSHTML 6.00.6000.16525" name=3DGENERATOR>
|
38
|
+
<STYLE></STYLE>
|
39
|
+
</HEAD>
|
40
|
+
<BODY bgColor=3D#ffffff>
|
41
|
+
<DIV><FONT face=3DArial size=3D2>Hello</FONT></DIV>
|
42
|
+
<DIV><FONT face=3DArial size=3D2><STRONG>This is an outlook=20
|
43
|
+
test</STRONG></FONT></DIV>
|
44
|
+
<DIV><FONT face=3DArial size=3D2><STRONG></STRONG></FONT> </DIV>
|
45
|
+
<DIV><FONT face=3DArial size=3D2><STRONG>So there.</STRONG></FONT></DIV>
|
46
|
+
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
|
47
|
+
<DIV><FONT face=3DArial size=3D2>Me.</FONT></DIV></BODY></HTML>
|
48
|
+
|
49
|
+
|
50
|
+
------=_NextPart_000_0093_01C81419.EB75E850--
|
51
|
+
|
52
|
+
|
53
|
+
Return-Path: <mikel.other@baci>
|
54
|
+
Received: from some.isp.com by baci with ESMTP id 632BD5758 for <mikel.lindsaar@baci>; Sun, 21 Oct 2007 19:38:21 +1000
|
55
|
+
Date: Sun, 21 Oct 2007 19:38:13 +1000
|
56
|
+
From: Mikel Lindsaar <mikel.other@baci>
|
57
|
+
Reply-To: Mikel Lindsaar <mikel.other@baci>
|
58
|
+
To: mikel.lindsaar@baci
|
59
|
+
Message-Id: <009601c813c6$19df3510$0437d30a@mikel091a>
|
60
|
+
Subject: Testing outlook
|
61
|
+
Mime-Version: 1.0
|
62
|
+
Content-Type: multipart/alternative; boundary=----=_NextPart_000_0093_01C81419.EB75E850
|
63
|
+
Delivered-To: mikel.lindsaar@baci
|
64
|
+
X-Mimeole: Produced By Microsoft MimeOLE V6.00.2900.3138
|
65
|
+
X-Msmail-Priority: Normal
|
66
|
+
|
67
|
+
This is a multi-part message in MIME format.
|
68
|
+
|
69
|
+
|
70
|
+
------=_NextPart_000_0093_01C81419.EB75E850
|
71
|
+
Content-Type: text/plain; charset=iso-8859-1
|
72
|
+
Content-Transfer-Encoding: Quoted-printable
|
73
|
+
|
74
|
+
Hello
|
75
|
+
This is an outlook test
|
76
|
+
|
77
|
+
So there.
|
78
|
+
|
79
|
+
Me.
|
80
|
+
|
81
|
+
------=_NextPart_000_0093_01C81419.EB75E850
|
82
|
+
Content-Type: text/html; charset=iso-8859-1
|
83
|
+
Content-Transfer-Encoding: Quoted-printable
|
84
|
+
|
85
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
86
|
+
<HTML><HEAD>
|
87
|
+
<META http-equiv=3DContent-Type content=3D"text/html; =
|
88
|
+
charset=3Diso-8859-1">
|
89
|
+
<META content=3D"MSHTML 6.00.6000.16525" name=3DGENERATOR>
|
90
|
+
<STYLE></STYLE>
|
91
|
+
</HEAD>
|
92
|
+
<BODY bgColor=3D#ffffff>
|
93
|
+
<DIV><FONT face=3DArial size=3D2>Hello</FONT></DIV>
|
94
|
+
<DIV><FONT face=3DArial size=3D2><STRONG>This is an outlook=20
|
95
|
+
test</STRONG></FONT></DIV>
|
96
|
+
<DIV><FONT face=3DArial size=3D2><STRONG></STRONG></FONT> </DIV>
|
97
|
+
<DIV><FONT face=3DArial size=3D2><STRONG>So there.</STRONG></FONT></DIV>
|
98
|
+
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
|
99
|
+
<DIV><FONT face=3DArial size=3D2>Me.</FONT></DIV></BODY></HTML>
|
100
|
+
|
101
|
+
|
102
|
+
------=_NextPart_000_0093_01C81419.EB75E850--
|
103
|
+
|
104
|
+
|
@@ -0,0 +1,100 @@
|
|
1
|
+
From jamis@37signals.com Thu Feb 22 11:20:31 2007
|
2
|
+
Mime-Version: 1.0 (Apple Message framework v752.3)
|
3
|
+
Message-Id: <2CCE0408-10C7-4045-9B16-A1C11C31469B@37signals.com>
|
4
|
+
Content-Type: multipart/signed;
|
5
|
+
micalg=sha1;
|
6
|
+
boundary=Apple-Mail-42-587703407;
|
7
|
+
protocol="application/pkcs7-signature"
|
8
|
+
To: Jamis Buck <jamis@jamisbuck.org>
|
9
|
+
Subject: Testing attachments
|
10
|
+
From: Jamis Buck <jamis@37signals.com>
|
11
|
+
Date: Thu, 22 Feb 2007 11:20:31 -0700
|
12
|
+
|
13
|
+
|
14
|
+
--Apple-Mail-42-587703407
|
15
|
+
Content-Type: multipart/mixed;
|
16
|
+
boundary=Apple-Mail-41-587703287
|
17
|
+
|
18
|
+
|
19
|
+
--Apple-Mail-41-587703287
|
20
|
+
Content-Transfer-Encoding: 7bit
|
21
|
+
Content-Type: text/plain;
|
22
|
+
charset=US-ASCII;
|
23
|
+
format=flowed
|
24
|
+
|
25
|
+
Here is a test of an attachment via email.
|
26
|
+
|
27
|
+
- Jamis
|
28
|
+
|
29
|
+
|
30
|
+
--Apple-Mail-41-587703287
|
31
|
+
Content-Transfer-Encoding: base64
|
32
|
+
Content-Type: image/png;
|
33
|
+
x-unix-mode=0644;
|
34
|
+
name=byo-ror-cover.png
|
35
|
+
Content-Disposition: inline;
|
36
|
+
filename=truncated.png
|
37
|
+
|
38
|
+
iVBORw0KGgoAAAANSUhEUgAAAKUAAADXCAYAAAB7wZEQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz
|
39
|
+
AAALEgAACxIB0t1+/AAAABd0RVh0Q3JlYXRpb24gVGltZQAxLzI1LzIwMDeD9CJVAAAAGHRFWHRT
|
40
|
+
b2Z0d2FyZQBBZG9iZSBGaXJld29ya3NPsx9OAAAyBWlUWHRYTUw6Y29tLmFkb2JlLnhtcDw/eHBh
|
41
|
+
Y2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1l
|
42
|
+
dGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1j
|
43
|
+
MDIwIDEuMjU1NzE2LCBUdWUgT2N0IDEwIDIwMDYgMjM6MTY6MzQiPgogICA8cmRmOlJERiB4bWxu
|
44
|
+
czpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAg
|
45
|
+
ICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0
|
46
|
+
dHA6Ly9ucy5h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73
|
+
--Apple-Mail-41-587703287--
|
74
|
+
|
75
|
+
--Apple-Mail-42-587703407
|
76
|
+
Content-Transfer-Encoding: base64
|
77
|
+
Content-Type: application/pkcs7-signature;
|
78
|
+
name=smime.p7s
|
79
|
+
Content-Disposition: attachment;
|
80
|
+
filename=smime.p7s
|
81
|
+
|
82
|
+
MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIGJzCCAuAw
|
83
|
+
ggJJoAMCAQICEFjnFNYXwDEZRWY5EkfzopUwDQYJKoZIhvcNAQEFBQAwYjELMAkGA1UEBhMCWkEx
|
84
|
+
JTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQ
|
85
|
+
ZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4XDTA2MDkxMjE3MDExMloXDTA3MDkxMjE3MDEx
|
86
|
+
MlowRTEfMB0GA1UEAxMWVGhhd3RlIEZyZWVtYWlsIE1lbWJlcjEiMCAGCSqGSIb3DQEJARYTamFt
|
87
|
+
aXNAMzdzaWduYWxzLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAO2A9JeOFIFJ
|
88
|
+
G6z8pTcAldrZ2nMe+Xb1tNrbHgoVzN/QhHXM4qst2Ml93cmFLjMmwG7P9RJeU4oNx+jTqVoBB7NV
|
89
|
+
Ne1/o56Do0KhfMZ9iUDQdPLbkZMq4EEpFMdm6PyM3muRKwPhj66iAWe/osCb8DowUK2f66vaRx0Z
|
90
|
+
Y0MQHIIrXE02Ta4IfAhIfPqBLkZ4WgTYBHN9vMdYea1jF0GO4gqGk1wqwb3yxv2QMYMbwJ6SI+k/
|
91
|
+
ZjkSR/OilTCBhwYLKoZIhvcNAQkQAgsxeKB2MGIxCzAJBgNVBAYTAlpBMSUwIwYDVQQKExxUaGF3
|
92
|
+
dGUgQ29uc3VsdGluZyAoUHR5KSBMdGQuMSwwKgYDVQQDEyNUaGF3dGUgUGVyc29uYWwgRnJlZW1h
|
93
|
+
aWwgSXNzdWluZyBDQQIQWOcU1hfAMRlFZjkSR/OilTANBgkqhkiG9w0BAQEFAASCAQCfwQiC3v6/
|
94
|
+
yleRDGv3bJ4nQYQ+c3mz3+mn3Xi6uU35n3piwxZZaWRdmLyiXPvU+QReHpSf3l2qsEZM3sdE0XF9
|
95
|
+
eRul/+QTFJcDNXOEAxG1zC2Gpz+6c6RrX4Ou12Pwkp+pNrZWTSY/mZgdqcArupOBcZi7qBjoWcy5
|
96
|
+
wb54dfvSSjrjmqLbkH/E8ww/6gGQuU/xXpAUZgUrTmQHrNKeIdSh5oDkOxFaFWvnmb8Z/2ixKqW/
|
97
|
+
Ux6WqamyvBtTs/5YBEtnpZOk+uVoscYEUBhU+DVJ2OSvTdXSivMtBdXmGTsG22k+P1NGUHi/A7ev
|
98
|
+
xPaO0uk4V8xyjNlN4HPuGpkrlXwPAAAAAAAA
|
99
|
+
|
100
|
+
--Apple-Mail-42-587703407--
|
@@ -0,0 +1,14 @@
|
|
1
|
+
From jamis@37signals.com Mon May 2 16:07:05 2005
|
2
|
+
Mime-Version: 1.0 (Apple Message framework v622)
|
3
|
+
Content-Transfer-Encoding: base64
|
4
|
+
Message-Id: <d3b8cf8e49f04480850c28713a1f473e@37signals.com>
|
5
|
+
Content-Type: text/plain;
|
6
|
+
charset=EUC-KR;
|
7
|
+
format=flowed
|
8
|
+
To: jamis@37signals.com
|
9
|
+
From: Jamis Buck <jamis@37signals.com>
|
10
|
+
Subject: Re: Test: =?UTF-8?B?Iua8ouWtlyI=?= mid =?UTF-8?B?Iua8ouWtlyI=?= tail
|
11
|
+
Date: Mon, 2 May 2005 16:07:05 -0600
|
12
|
+
|
13
|
+
tOu6zrrQwMcguLbC+bChwfa3ziwgv+y4rrTCIMfPs6q01MC7ILnPvcC0z7TZLg0KDQrBpiDAzLin
|
14
|
+
wLogSmFtaXPA1LTPtNku
|
@@ -0,0 +1 @@
|
|
1
|
+
second mail
|
@@ -0,0 +1 @@
|
|
1
|
+
let's go!
|
@@ -0,0 +1 @@
|
|
1
|
+
Ignored when searching for implicitly multipart parts.
|
@@ -0,0 +1 @@
|
|
1
|
+
Ignored when searching for implicitly multipart parts.
|
@@ -0,0 +1 @@
|
|
1
|
+
yaml to: <%= @recipient %>
|
@@ -0,0 +1 @@
|
|
1
|
+
Hey Ho, <%= render :partial => "subtemplate" %>
|
@@ -0,0 +1,95 @@
|
|
1
|
+
require 'abstract_unit'
|
2
|
+
|
3
|
+
module MailerHelper
|
4
|
+
def person_name
|
5
|
+
"Mr. Joe Person"
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
class HelperMailer < ActionMailer::Base
|
10
|
+
helper MailerHelper
|
11
|
+
helper :example
|
12
|
+
|
13
|
+
def use_helper(recipient)
|
14
|
+
recipients recipient
|
15
|
+
subject "using helpers"
|
16
|
+
from "tester@example.com"
|
17
|
+
end
|
18
|
+
|
19
|
+
def use_example_helper(recipient)
|
20
|
+
recipients recipient
|
21
|
+
subject "using helpers"
|
22
|
+
from "tester@example.com"
|
23
|
+
self.body = { :text => "emphasize me!" }
|
24
|
+
end
|
25
|
+
|
26
|
+
def use_mail_helper(recipient)
|
27
|
+
recipients recipient
|
28
|
+
subject "using mailing helpers"
|
29
|
+
from "tester@example.com"
|
30
|
+
self.body = { :text =>
|
31
|
+
"But soft! What light through yonder window breaks? It is the east, " +
|
32
|
+
"and Juliet is the sun. Arise, fair sun, and kill the envious moon, " +
|
33
|
+
"which is sick and pale with grief that thou, her maid, art far more " +
|
34
|
+
"fair than she. Be not her maid, for she is envious! Her vestal " +
|
35
|
+
"livery is but sick and green, and none but fools do wear it. Cast " +
|
36
|
+
"it off!"
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
def use_helper_method(recipient)
|
41
|
+
recipients recipient
|
42
|
+
subject "using helpers"
|
43
|
+
from "tester@example.com"
|
44
|
+
self.body = { :text => "emphasize me!" }
|
45
|
+
end
|
46
|
+
|
47
|
+
private
|
48
|
+
|
49
|
+
def name_of_the_mailer_class
|
50
|
+
self.class.name
|
51
|
+
end
|
52
|
+
helper_method :name_of_the_mailer_class
|
53
|
+
end
|
54
|
+
|
55
|
+
class MailerHelperTest < Test::Unit::TestCase
|
56
|
+
def new_mail( charset="utf-8" )
|
57
|
+
mail = TMail::Mail.new
|
58
|
+
mail.set_content_type "text", "plain", { "charset" => charset } if charset
|
59
|
+
mail
|
60
|
+
end
|
61
|
+
|
62
|
+
def setup
|
63
|
+
set_delivery_method :test
|
64
|
+
ActionMailer::Base.perform_deliveries = true
|
65
|
+
ActionMailer::Base.deliveries = []
|
66
|
+
|
67
|
+
@recipient = 'test@localhost'
|
68
|
+
end
|
69
|
+
|
70
|
+
def teardown
|
71
|
+
restore_delivery_method
|
72
|
+
end
|
73
|
+
|
74
|
+
def test_use_helper
|
75
|
+
mail = HelperMailer.create_use_helper(@recipient)
|
76
|
+
assert_match %r{Mr. Joe Person}, mail.encoded
|
77
|
+
end
|
78
|
+
|
79
|
+
def test_use_example_helper
|
80
|
+
mail = HelperMailer.create_use_example_helper(@recipient)
|
81
|
+
assert_match %r{<em><strong><small>emphasize me!}, mail.encoded
|
82
|
+
end
|
83
|
+
|
84
|
+
def test_use_helper_method
|
85
|
+
mail = HelperMailer.create_use_helper_method(@recipient)
|
86
|
+
assert_match %r{HelperMailer}, mail.encoded
|
87
|
+
end
|
88
|
+
|
89
|
+
def test_use_mail_helper
|
90
|
+
mail = HelperMailer.create_use_mail_helper(@recipient)
|
91
|
+
assert_match %r{ But soft!}, mail.encoded
|
92
|
+
assert_match %r{east, and\n Juliet}, mail.encoded
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
@@ -0,0 +1,123 @@
|
|
1
|
+
require 'abstract_unit'
|
2
|
+
|
3
|
+
class AutoLayoutMailer < ActionMailer::Base
|
4
|
+
def hello(recipient)
|
5
|
+
recipients recipient
|
6
|
+
subject "You have a mail"
|
7
|
+
from "tester@example.com"
|
8
|
+
end
|
9
|
+
|
10
|
+
def spam(recipient)
|
11
|
+
recipients recipient
|
12
|
+
subject "You have a mail"
|
13
|
+
from "tester@example.com"
|
14
|
+
body render(:inline => "Hello, <%= @world %>", :layout => 'spam', :body => { :world => "Earth" })
|
15
|
+
end
|
16
|
+
|
17
|
+
def nolayout(recipient)
|
18
|
+
recipients recipient
|
19
|
+
subject "You have a mail"
|
20
|
+
from "tester@example.com"
|
21
|
+
body render(:inline => "Hello, <%= @world %>", :layout => false, :body => { :world => "Earth" })
|
22
|
+
end
|
23
|
+
|
24
|
+
def multipart(recipient, type = nil)
|
25
|
+
recipients recipient
|
26
|
+
subject "You have a mail"
|
27
|
+
from "tester@example.com"
|
28
|
+
|
29
|
+
content_type(type) if type
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
class ExplicitLayoutMailer < ActionMailer::Base
|
34
|
+
layout 'spam', :except => [:logout]
|
35
|
+
|
36
|
+
def signup(recipient)
|
37
|
+
recipients recipient
|
38
|
+
subject "You have a mail"
|
39
|
+
from "tester@example.com"
|
40
|
+
end
|
41
|
+
|
42
|
+
def logout(recipient)
|
43
|
+
recipients recipient
|
44
|
+
subject "You have a mail"
|
45
|
+
from "tester@example.com"
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
class LayoutMailerTest < Test::Unit::TestCase
|
50
|
+
def setup
|
51
|
+
set_delivery_method :test
|
52
|
+
ActionMailer::Base.perform_deliveries = true
|
53
|
+
ActionMailer::Base.deliveries = []
|
54
|
+
|
55
|
+
@recipient = 'test@localhost'
|
56
|
+
end
|
57
|
+
|
58
|
+
def teardown
|
59
|
+
restore_delivery_method
|
60
|
+
end
|
61
|
+
|
62
|
+
def test_should_pickup_default_layout
|
63
|
+
mail = AutoLayoutMailer.create_hello(@recipient)
|
64
|
+
assert_equal "Hello from layout Inside", mail.body.strip
|
65
|
+
end
|
66
|
+
|
67
|
+
def test_should_pickup_multipart_layout
|
68
|
+
mail = AutoLayoutMailer.create_multipart(@recipient)
|
69
|
+
assert_equal "multipart/alternative", mail.content_type
|
70
|
+
assert_equal 2, mail.parts.size
|
71
|
+
|
72
|
+
assert_equal 'text/plain', mail.parts.first.content_type
|
73
|
+
assert_equal "text/plain layout - text/plain multipart", mail.parts.first.body
|
74
|
+
|
75
|
+
assert_equal 'text/html', mail.parts.last.content_type
|
76
|
+
assert_equal "Hello from layout text/html multipart", mail.parts.last.body
|
77
|
+
end
|
78
|
+
|
79
|
+
def test_should_pickup_multipartmixed_layout
|
80
|
+
mail = AutoLayoutMailer.create_multipart(@recipient, "multipart/mixed")
|
81
|
+
assert_equal "multipart/mixed", mail.content_type
|
82
|
+
assert_equal 2, mail.parts.size
|
83
|
+
|
84
|
+
assert_equal 'text/plain', mail.parts.first.content_type
|
85
|
+
assert_equal "text/plain layout - text/plain multipart", mail.parts.first.body
|
86
|
+
|
87
|
+
assert_equal 'text/html', mail.parts.last.content_type
|
88
|
+
assert_equal "Hello from layout text/html multipart", mail.parts.last.body
|
89
|
+
end
|
90
|
+
|
91
|
+
def test_should_fix_multipart_layout
|
92
|
+
mail = AutoLayoutMailer.create_multipart(@recipient, "text/plain")
|
93
|
+
assert_equal "multipart/alternative", mail.content_type
|
94
|
+
assert_equal 2, mail.parts.size
|
95
|
+
|
96
|
+
assert_equal 'text/plain', mail.parts.first.content_type
|
97
|
+
assert_equal "text/plain layout - text/plain multipart", mail.parts.first.body
|
98
|
+
|
99
|
+
assert_equal 'text/html', mail.parts.last.content_type
|
100
|
+
assert_equal "Hello from layout text/html multipart", mail.parts.last.body
|
101
|
+
end
|
102
|
+
|
103
|
+
|
104
|
+
def test_should_pickup_layout_given_to_render
|
105
|
+
mail = AutoLayoutMailer.create_spam(@recipient)
|
106
|
+
assert_equal "Spammer layout Hello, Earth", mail.body.strip
|
107
|
+
end
|
108
|
+
|
109
|
+
def test_should_respect_layout_false
|
110
|
+
mail = AutoLayoutMailer.create_nolayout(@recipient)
|
111
|
+
assert_equal "Hello, Earth", mail.body.strip
|
112
|
+
end
|
113
|
+
|
114
|
+
def test_explicit_class_layout
|
115
|
+
mail = ExplicitLayoutMailer.create_signup(@recipient)
|
116
|
+
assert_equal "Spammer layout We do not spam", mail.body.strip
|
117
|
+
end
|
118
|
+
|
119
|
+
def test_explicit_layout_exceptions
|
120
|
+
mail = ExplicitLayoutMailer.create_logout(@recipient)
|
121
|
+
assert_equal "You logged out", mail.body.strip
|
122
|
+
end
|
123
|
+
end
|