質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
SMTP

SMTP(Simple Mail Transfer Protocol)はIPネットワークでemailを伝送する為のプロトコルです。

Q&A

解決済

1回答

4139閲覧

smtp4dev起動できなくなった

kazuyakazuya

総合スコア193

SMTP

SMTP(Simple Mail Transfer Protocol)はIPネットワークでemailを伝送する為のプロトコルです。

0グッド

1クリップ

投稿2019/08/07 22:55

参考サイト
smtp4devをここから入手して
ダミーのSMTPサーバー(localhost)にメールを送ろうとしたのですが
イメージ説明
実行すると

基礎的なる接続が閉じられました。送信時に、予期しないエラーが発生しました。

といったエラーが発生してしまいます。

このファイルを実行するのは2回目で1回目は何も問題なく動いたのですが
2回目以降開こうとするとこのようなエラーになります。

このエラーの表示後 はいを押すと
イメージ説明
アプリは起動するのですが
セッションのスタート(?)をさせようとボタンをクリックしても反応がありません。

一応、1回目で成功した送信プログラムを送ってみてのですが・・・

ruby

1require 'net/smtp' 2 3Net::SMTP.start('localhost', 25) {|smtp| 4 smtp.send_message(<<-EndOfMail, 'from@example.com', 'to@example.net') 5 From: Your Name <from@example.com> 6 To: Dest Address <to@example.net> 7 Subject: test mail 8 Date: Sat, 23 Jun 2001 16:26:43 +0900 9 Message-Id: <unique.message.id.string@yourhost.example.com> 10 11 This is a test mail. 12 EndOfMail 13} 14

やはり、反応がありませんでした。

何が原因なのでしょうか?
1回目のの時セッションを閉じずにアプリを終了したから
ポートがかぶっているのかと思ったのですが

cmd

1tasklist 2 3イメージ名 PID セッション名 セッション# メモリ使用量 4========================= ======== ================ =========== ============ 5System Idle Process 0 Services 0 8 K 6System 4 Services 0 7,564 K 7Registry 96 Services 0 32,012 K 8smss.exe 528 Services 0 400 K 9csrss.exe 756 Services 0 2,012 K 10wininit.exe 844 Services 0 1,012 K 11services.exe 988 Services 0 5,476 K 12lsass.exe 1016 Services 0 13,500 K 13svchost.exe 780 Services 0 576 K 14WUDFHost.exe 656 Services 0 1,180 K 15fontdrvhost.exe 472 Services 0 1,048 K 16svchost.exe 1108 Services 0 22,436 K 17WUDFHost.exe 1180 Services 0 1,900 K 18svchost.exe 1232 Services 0 13,204 K 19svchost.exe 1284 Services 0 3,460 K 20svchost.exe 1452 Services 0 4,608 K 21svchost.exe 1524 Services 0 2,092 K 22svchost.exe 1576 Services 0 5,372 K 23svchost.exe 1596 Services 0 5,036 K 24svchost.exe 1664 Services 0 2,200 K 25svchost.exe 1692 Services 0 2,032 K 26svchost.exe 1796 Services 0 9,176 K 27svchost.exe 1840 Services 0 1,956 K 28svchost.exe 1868 Services 0 5,476 K 29svchost.exe 1896 Services 0 1,984 K 30svchost.exe 1980 Services 0 744 K 31svchost.exe 1572 Services 0 5,464 K 32svchost.exe 2184 Services 0 4,972 K 33svchost.exe 2292 Services 0 11,892 K 34svchost.exe 2332 Services 0 9,004 K 35svchost.exe 2364 Services 0 1,264 K 36svchost.exe 2372 Services 0 84,844 K 37svchost.exe 2380 Services 0 3,116 K 38Memory Compression 2436 Services 0 610,984 K 39svchost.exe 2492 Services 0 4,864 K 40igfxCUIService.exe 2532 Services 0 2,072 K 41svchost.exe 2540 Services 0 3,836 K 42svchost.exe 2608 Services 0 4,612 K 43svchost.exe 2616 Services 0 4,788 K 44svchost.exe 2624 Services 0 2,504 K 45svchost.exe 2792 Services 0 9,200 K 46svchost.exe 2884 Services 0 5,888 K 47svchost.exe 2972 Services 0 7,588 K 48svchost.exe 2848 Services 0 5,616 K 49svchost.exe 2860 Services 0 6,304 K 50svchost.exe 3068 Services 0 2,368 K 51svchost.exe 3252 Services 0 3,860 K 52svchost.exe 3384 Services 0 7,756 K 53svchost.exe 3428 Services 0 3,136 K 54spoolsv.exe 3508 Services 0 2,384 K 55svchost.exe 3620 Services 0 11,256 K 56svchost.exe 3668 Services 0 2,964 K 57coreServiceShell.exe 3724 Services 0 142,420 K 58HidMonitorSvc.exe 3812 Services 0 1,024 K 59httpd.exe 3820 Services 0 1,060 K 60IntelCpHDCPSvc.exe 3828 Services 0 1,312 K 61BService.exe 3836 Services 0 1,240 K 62uiWatchDog.exe 3848 Services 0 1,076 K 63svchost.exe 3860 Services 0 9,336 K 64svchost.exe 3872 Services 0 9,948 K 65svchost.exe 3892 Services 0 20,232 K 66mysqld.exe 3900 Services 0 916 K 67NTMETER.exe 3948 Services 0 1,160 K 68PtSvcHost.exe 3964 Services 0 107,096 K 69rcdservice.exe 3988 Services 0 1,152 K 70RtkBtManServ.exe 4000 Services 0 2,556 K 71vmnetdhcp.exe 4032 Services 0 1,032 K 72vmnat.exe 4040 Services 0 2,052 K 73svchost.exe 4084 Services 0 21,836 K 74svchost.exe 2832 Services 0 1,300 K 75svchost.exe 2940 Services 0 1,196 K 76IntelCpHeciSvc.exe 2784 Services 0 8,072 K 77svchost.exe 3140 Services 0 12,336 K 78vmware-usbarbitrator64.ex 3696 Services 0 2,524 K 79vmware-authd.exe 3156 Services 0 4,348 K 80svchost.exe 1772 Services 0 6,676 K 81PtWatchDog.exe 4284 Services 0 1,048 K 82svchost.exe 4464 Services 0 1,268 K 83conhost.exe 4592 Services 0 888 K 84svchost.exe 4628 Services 0 3,656 K 85httpd.exe 4636 Services 0 1,664 K 86svchost.exe 4684 Services 0 5,092 K 87coreFrameworkHost.exe 4228 Services 0 804 K 88conhost.exe 4324 Services 0 1,232 K

何が原因なのかがわかりません。
解決できそうにないので
参考になるリンクまたは説明をお願いします。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

自己解決

ポート番号をデフォルトの25番から
50000番あたりに変更したらいけました。
やはり、ポートが問題だったようです。

投稿2019/08/08 00:57

kazuyakazuya

総合スコア193

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問