質問編集履歴
2
訂正
title
CHANGED
File without changes
|
body
CHANGED
@@ -70,7 +70,7 @@
|
|
70
70
|
```ruby
|
71
71
|
require 'net/smtp'
|
72
72
|
a = Net::SMTP.new("localhost",50001)
|
73
|
-
smtp = a.start('localhost',"a","
|
73
|
+
smtp = a.start('localhost',"a","password")
|
74
74
|
smtp.send_message(<<-EndOfMail, 'from@example.com', 'to@example.net')
|
75
75
|
From: Your Name <from@example.com>
|
76
76
|
To: Dest Address <to@example.net>
|
1
追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -63,4 +63,21 @@
|
|
63
63
|
あと、上記のコードではユーザーの部分をnilを指定していますが
|
64
64
|
smtp4devではユーザーの名前を指定するようなところがないので
|
65
65
|
nilとしたのですがこれがいけないのでしょうか?
|
66
|
-
分からないので参考になるリンクまたは説明をお願いします。
|
66
|
+
分からないので参考になるリンクまたは説明をお願いします。
|
67
|
+
|
68
|
+
---
|
69
|
+
|
70
|
+
```ruby
|
71
|
+
require 'net/smtp'
|
72
|
+
a = Net::SMTP.new("localhost",50001)
|
73
|
+
smtp = a.start('localhost',"a","a")
|
74
|
+
smtp.send_message(<<-EndOfMail, 'from@example.com', 'to@example.net')
|
75
|
+
From: Your Name <from@example.com>
|
76
|
+
To: Dest Address <to@example.net>
|
77
|
+
Subject: test mail
|
78
|
+
Date: Sat, 23 Jun 2001 16:26:43 +0900
|
79
|
+
Message-Id: <unique.message.id.string@yourhost.example.com>
|
80
|
+
|
81
|
+
This is a test mail.
|
82
|
+
EndOfMail
|
83
|
+
```
|