bulkmail 0.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +17 -1
- data/README +18 -20
- data/Rakefile +4 -2
- data/bin/bulkmail +19 -44
- data/doc/rdoc/created.rid +1 -1
- data/lib/bulkmail.rb +4 -110
- data/lib/bulkmail/dns_mx.rb +18 -0
- data/lib/bulkmail/message.rb +103 -0
- data/lib/bulkmail/sender.rb +90 -0
- data/lib/bulkmail/thread_pool.rb +113 -0
- metadata +17 -20
- data/doc/rdoc/classes/Array.html +0 -155
- data/doc/rdoc/classes/BulkMail.html +0 -310
- data/doc/rdoc/classes/String.html +0 -178
- data/doc/rdoc/classes/Symbol.html +0 -155
- data/doc/rdoc/files/CHANGELOG.html +0 -165
- data/doc/rdoc/files/COPYING.html +0 -129
- data/doc/rdoc/files/README.html +0 -160
- data/doc/rdoc/files/lib/bulkmail_rb.html +0 -108
- data/doc/rdoc/fr_class_index.html +0 -30
- data/doc/rdoc/fr_file_index.html +0 -30
- data/doc/rdoc/fr_method_index.html +0 -35
- data/doc/rdoc/index.html +0 -24
- data/doc/rdoc/rdoc-style.css +0 -208
data/doc/rdoc/files/COPYING.html
DELETED
@@ -1,129 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
-
<head>
|
8
|
-
<title>File: COPYING</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
|
-
<script type="text/javascript">
|
13
|
-
// <![CDATA[
|
14
|
-
|
15
|
-
function popupCode( url ) {
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
-
}
|
18
|
-
|
19
|
-
function toggleCode( id ) {
|
20
|
-
if ( document.getElementById )
|
21
|
-
elem = document.getElementById( id );
|
22
|
-
else if ( document.all )
|
23
|
-
elem = eval( "document.all." + id );
|
24
|
-
else
|
25
|
-
return false;
|
26
|
-
|
27
|
-
elemStyle = elem.style;
|
28
|
-
|
29
|
-
if ( elemStyle.display != "block" ) {
|
30
|
-
elemStyle.display = "block"
|
31
|
-
} else {
|
32
|
-
elemStyle.display = "none"
|
33
|
-
}
|
34
|
-
|
35
|
-
return true;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
-
|
41
|
-
// ]]>
|
42
|
-
</script>
|
43
|
-
|
44
|
-
</head>
|
45
|
-
<body>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<div id="fileHeader">
|
50
|
-
<h1>COPYING</h1>
|
51
|
-
<table class="header-table">
|
52
|
-
<tr class="top-aligned-row">
|
53
|
-
<td><strong>Path:</strong></td>
|
54
|
-
<td>COPYING
|
55
|
-
</td>
|
56
|
-
</tr>
|
57
|
-
<tr class="top-aligned-row">
|
58
|
-
<td><strong>Last Update:</strong></td>
|
59
|
-
<td>Sun Sep 10 18:46:55 +0300 2006</td>
|
60
|
-
</tr>
|
61
|
-
</table>
|
62
|
-
</div>
|
63
|
-
<!-- banner header -->
|
64
|
-
|
65
|
-
<div id="bodyContent">
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
<div id="contextContent">
|
70
|
-
|
71
|
-
<div id="description">
|
72
|
-
<p>
|
73
|
-
Copyright (c) 2006 Sharon Rosner
|
74
|
-
</p>
|
75
|
-
<p>
|
76
|
-
Permission is hereby granted, free of charge, to any person obtaining a
|
77
|
-
copy of this software and associated documentation files (the
|
78
|
-
"Software"), to deal in the Software without restriction,
|
79
|
-
including without limitation the rights to use, copy, modify, merge,
|
80
|
-
publish, distribute, sublicense, and/or sell copies of the Software, and to
|
81
|
-
permit persons to whom the Software is furnished to do so, subject to the
|
82
|
-
following conditions:
|
83
|
-
</p>
|
84
|
-
<p>
|
85
|
-
The above copyright notice and this permission notice shall be included in
|
86
|
-
all copies or substantial portions of the Software.
|
87
|
-
</p>
|
88
|
-
<p>
|
89
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
90
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
91
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
92
|
-
NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
93
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
94
|
-
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
95
|
-
DEALINGS IN THE SOFTWARE.
|
96
|
-
</p>
|
97
|
-
|
98
|
-
</div>
|
99
|
-
|
100
|
-
|
101
|
-
</div>
|
102
|
-
|
103
|
-
|
104
|
-
</div>
|
105
|
-
|
106
|
-
|
107
|
-
<!-- if includes -->
|
108
|
-
|
109
|
-
<div id="section">
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
<!-- if method_list -->
|
119
|
-
|
120
|
-
|
121
|
-
</div>
|
122
|
-
|
123
|
-
|
124
|
-
<div id="validator-badges">
|
125
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
126
|
-
</div>
|
127
|
-
|
128
|
-
</body>
|
129
|
-
</html>
|
data/doc/rdoc/files/README.html
DELETED
@@ -1,160 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
-
<head>
|
8
|
-
<title>File: README</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
|
-
<script type="text/javascript">
|
13
|
-
// <![CDATA[
|
14
|
-
|
15
|
-
function popupCode( url ) {
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
-
}
|
18
|
-
|
19
|
-
function toggleCode( id ) {
|
20
|
-
if ( document.getElementById )
|
21
|
-
elem = document.getElementById( id );
|
22
|
-
else if ( document.all )
|
23
|
-
elem = eval( "document.all." + id );
|
24
|
-
else
|
25
|
-
return false;
|
26
|
-
|
27
|
-
elemStyle = elem.style;
|
28
|
-
|
29
|
-
if ( elemStyle.display != "block" ) {
|
30
|
-
elemStyle.display = "block"
|
31
|
-
} else {
|
32
|
-
elemStyle.display = "none"
|
33
|
-
}
|
34
|
-
|
35
|
-
return true;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
-
|
41
|
-
// ]]>
|
42
|
-
</script>
|
43
|
-
|
44
|
-
</head>
|
45
|
-
<body>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<div id="fileHeader">
|
50
|
-
<h1>README</h1>
|
51
|
-
<table class="header-table">
|
52
|
-
<tr class="top-aligned-row">
|
53
|
-
<td><strong>Path:</strong></td>
|
54
|
-
<td>README
|
55
|
-
</td>
|
56
|
-
</tr>
|
57
|
-
<tr class="top-aligned-row">
|
58
|
-
<td><strong>Last Update:</strong></td>
|
59
|
-
<td>Fri Oct 27 11:36:45 +0200 2006</td>
|
60
|
-
</tr>
|
61
|
-
</table>
|
62
|
-
</div>
|
63
|
-
<!-- banner header -->
|
64
|
-
|
65
|
-
<div id="bodyContent">
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
<div id="contextContent">
|
70
|
-
|
71
|
-
<div id="description">
|
72
|
-
<h1>about bulkmail</h1>
|
73
|
-
<p>
|
74
|
-
Bulkmail is a simple bulk mailing utility in Ruby. It takes a content file
|
75
|
-
and a recipients file, and sends the content to each address listed in the
|
76
|
-
recipients file. I wrote it to be as simple as possible, and as a basic
|
77
|
-
alternative to commercial bulk-mailers. The free ones suck.
|
78
|
-
</p>
|
79
|
-
<h2>Usage</h2>
|
80
|
-
<h3>From the Command Line</h3>
|
81
|
-
<pre>
|
82
|
-
bulkmail <options>
|
83
|
-
</pre>
|
84
|
-
<p>
|
85
|
-
where the options are:
|
86
|
-
</p>
|
87
|
-
<pre>
|
88
|
-
[--recipients, -r] recipients file name
|
89
|
-
[--content, -c] content file name
|
90
|
-
[--subject, -s] subject
|
91
|
-
[--from, -f] from
|
92
|
-
[--host, -h] smtp hostname (if none is specified localhost is presumed)
|
93
|
-
[--user, -u] user name (if authentication is needed)
|
94
|
-
[--password, -p] password (if authentication is needed)
|
95
|
-
[--auth, -a] authentication type
|
96
|
-
[--mime, -m] message mime type.
|
97
|
-
</pre>
|
98
|
-
<p>
|
99
|
-
You can also include headers in the content file, provided they are
|
100
|
-
followed by a blank line. For example:
|
101
|
-
</p>
|
102
|
-
<pre>
|
103
|
-
Subject: My New Thing
|
104
|
-
Content-Type: text/html; charset=UTF-8
|
105
|
-
|
106
|
-
<html><body><h1>My New Thing!</h1></body></html>
|
107
|
-
</pre>
|
108
|
-
<h3>From Ruby</h3>
|
109
|
-
<pre>
|
110
|
-
BulkMail.send_bulk(sender, recipients, content, headers)
|
111
|
-
</pre>
|
112
|
-
<p>
|
113
|
-
Where:
|
114
|
-
</p>
|
115
|
-
<pre>
|
116
|
-
[sender] is the sender address. This address will also be used as in the form and to headers.
|
117
|
-
[recipients] is an array of email addresses
|
118
|
-
[content] is the message content
|
119
|
-
[headers] is an array containing message headers.
|
120
|
-
</pre>
|
121
|
-
<p>
|
122
|
-
You can change server settings by using <a
|
123
|
-
href="../classes/BulkMail.html#M000001">BulkMail.server_settings</a>:
|
124
|
-
</p>
|
125
|
-
<pre>
|
126
|
-
BulkMail.server_settings[:host] = 'mail.example.com'
|
127
|
-
</pre>
|
128
|
-
|
129
|
-
</div>
|
130
|
-
|
131
|
-
|
132
|
-
</div>
|
133
|
-
|
134
|
-
|
135
|
-
</div>
|
136
|
-
|
137
|
-
|
138
|
-
<!-- if includes -->
|
139
|
-
|
140
|
-
<div id="section">
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
<!-- if method_list -->
|
150
|
-
|
151
|
-
|
152
|
-
</div>
|
153
|
-
|
154
|
-
|
155
|
-
<div id="validator-badges">
|
156
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
157
|
-
</div>
|
158
|
-
|
159
|
-
</body>
|
160
|
-
</html>
|
@@ -1,108 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
-
<head>
|
8
|
-
<title>File: bulkmail.rb</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
-
<script type="text/javascript">
|
13
|
-
// <![CDATA[
|
14
|
-
|
15
|
-
function popupCode( url ) {
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
-
}
|
18
|
-
|
19
|
-
function toggleCode( id ) {
|
20
|
-
if ( document.getElementById )
|
21
|
-
elem = document.getElementById( id );
|
22
|
-
else if ( document.all )
|
23
|
-
elem = eval( "document.all." + id );
|
24
|
-
else
|
25
|
-
return false;
|
26
|
-
|
27
|
-
elemStyle = elem.style;
|
28
|
-
|
29
|
-
if ( elemStyle.display != "block" ) {
|
30
|
-
elemStyle.display = "block"
|
31
|
-
} else {
|
32
|
-
elemStyle.display = "none"
|
33
|
-
}
|
34
|
-
|
35
|
-
return true;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
-
|
41
|
-
// ]]>
|
42
|
-
</script>
|
43
|
-
|
44
|
-
</head>
|
45
|
-
<body>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<div id="fileHeader">
|
50
|
-
<h1>bulkmail.rb</h1>
|
51
|
-
<table class="header-table">
|
52
|
-
<tr class="top-aligned-row">
|
53
|
-
<td><strong>Path:</strong></td>
|
54
|
-
<td>lib/bulkmail.rb
|
55
|
-
</td>
|
56
|
-
</tr>
|
57
|
-
<tr class="top-aligned-row">
|
58
|
-
<td><strong>Last Update:</strong></td>
|
59
|
-
<td>Fri Oct 27 11:38:32 +0200 2006</td>
|
60
|
-
</tr>
|
61
|
-
</table>
|
62
|
-
</div>
|
63
|
-
<!-- banner header -->
|
64
|
-
|
65
|
-
<div id="bodyContent">
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
<div id="contextContent">
|
70
|
-
|
71
|
-
|
72
|
-
<div id="requires-list">
|
73
|
-
<h3 class="section-bar">Required files</h3>
|
74
|
-
|
75
|
-
<div class="name-list">
|
76
|
-
net/smtp
|
77
|
-
</div>
|
78
|
-
</div>
|
79
|
-
|
80
|
-
</div>
|
81
|
-
|
82
|
-
|
83
|
-
</div>
|
84
|
-
|
85
|
-
|
86
|
-
<!-- if includes -->
|
87
|
-
|
88
|
-
<div id="section">
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
<!-- if method_list -->
|
98
|
-
|
99
|
-
|
100
|
-
</div>
|
101
|
-
|
102
|
-
|
103
|
-
<div id="validator-badges">
|
104
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
105
|
-
</div>
|
106
|
-
|
107
|
-
</body>
|
108
|
-
</html>
|
@@ -1,30 +0,0 @@
|
|
1
|
-
|
2
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
3
|
-
<!DOCTYPE html
|
4
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
5
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
6
|
-
|
7
|
-
<!--
|
8
|
-
|
9
|
-
Classes
|
10
|
-
|
11
|
-
-->
|
12
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
13
|
-
<head>
|
14
|
-
<title>Classes</title>
|
15
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
16
|
-
<link rel="stylesheet" href="rdoc-style.css" type="text/css" />
|
17
|
-
<base target="docwin" />
|
18
|
-
</head>
|
19
|
-
<body>
|
20
|
-
<div id="index">
|
21
|
-
<h1 class="section-bar">Classes</h1>
|
22
|
-
<div id="index-entries">
|
23
|
-
<a href="classes/Array.html">Array</a><br />
|
24
|
-
<a href="classes/BulkMail.html">BulkMail</a><br />
|
25
|
-
<a href="classes/String.html">String</a><br />
|
26
|
-
<a href="classes/Symbol.html">Symbol</a><br />
|
27
|
-
</div>
|
28
|
-
</div>
|
29
|
-
</body>
|
30
|
-
</html>
|
data/doc/rdoc/fr_file_index.html
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
|
2
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
3
|
-
<!DOCTYPE html
|
4
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
5
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
6
|
-
|
7
|
-
<!--
|
8
|
-
|
9
|
-
Files
|
10
|
-
|
11
|
-
-->
|
12
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
13
|
-
<head>
|
14
|
-
<title>Files</title>
|
15
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
16
|
-
<link rel="stylesheet" href="rdoc-style.css" type="text/css" />
|
17
|
-
<base target="docwin" />
|
18
|
-
</head>
|
19
|
-
<body>
|
20
|
-
<div id="index">
|
21
|
-
<h1 class="section-bar">Files</h1>
|
22
|
-
<div id="index-entries">
|
23
|
-
<a href="files/CHANGELOG.html">CHANGELOG</a><br />
|
24
|
-
<a href="files/COPYING.html">COPYING</a><br />
|
25
|
-
<a href="files/README.html">README</a><br />
|
26
|
-
<a href="files/lib/bulkmail_rb.html">lib/bulkmail.rb</a><br />
|
27
|
-
</div>
|
28
|
-
</div>
|
29
|
-
</body>
|
30
|
-
</html>
|