質問編集履歴
2
訂正
test
CHANGED
File without changes
|
test
CHANGED
@@ -142,7 +142,7 @@
|
|
142
142
|
|
143
143
|
a = Net::SMTP.new("localhost",50001)
|
144
144
|
|
145
|
-
smtp = a.start('localhost',"a","a")
|
145
|
+
smtp = a.start('localhost',"a","password")
|
146
146
|
|
147
147
|
smtp.send_message(<<-EndOfMail, 'from@example.com', 'to@example.net')
|
148
148
|
|
1
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -129,3 +129,37 @@
|
|
129
129
|
nilとしたのですがこれがいけないのでしょうか?
|
130
130
|
|
131
131
|
分からないので参考になるリンクまたは説明をお願いします。
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
---
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
```ruby
|
140
|
+
|
141
|
+
require 'net/smtp'
|
142
|
+
|
143
|
+
a = Net::SMTP.new("localhost",50001)
|
144
|
+
|
145
|
+
smtp = a.start('localhost',"a","a")
|
146
|
+
|
147
|
+
smtp.send_message(<<-EndOfMail, 'from@example.com', 'to@example.net')
|
148
|
+
|
149
|
+
From: Your Name <from@example.com>
|
150
|
+
|
151
|
+
To: Dest Address <to@example.net>
|
152
|
+
|
153
|
+
Subject: test mail
|
154
|
+
|
155
|
+
Date: Sat, 23 Jun 2001 16:26:43 +0900
|
156
|
+
|
157
|
+
Message-Id: <unique.message.id.string@yourhost.example.com>
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
This is a test mail.
|
162
|
+
|
163
|
+
EndOfMail
|
164
|
+
|
165
|
+
```
|