問題タブ [ssmtp]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
php - PHP mail() がメールを送信しないのはなぜですか?
ユーザーが自分の Web サイトでフォームを送信したときに、本当に単純なメールを送信する必要があるだけです。(私は PHPMailer の使用を検討しましたが、実際にメールを送信することに失敗しました。実際には必要以上に複雑であるため、あきらめました。) .php ファイルを処理するフォームで、最後にこのコード:
「メールを送信しました」というメッセージが表示されますが、個人のメール アドレスを入力してもメールが届きません。このコードが正しく解釈されているように見えるのに、メールが送信されない理由を知っている人はいますか?
上記の mail() をテストする前に行った手順を次に示します。
1) ssmtp をインストール
しました 2) /etc/ssmtp/ssmtp.conf を次のように構成しました:
3)/etc/php5/apache2/php.ini
で/etc/php5/cli/php.ini
始まる行を設定しますsendmail_path
4 sendmail_path = /usr/sbin/ssmtp -t
) apache2 を再起動しました: "sudo service apache2 restart"
注: SO に関するこのトピックに関する他の多くの投稿を見てきましたが、これらの質問の解決策は実際には見つかりませんでした。おそらく、これらの他の投稿で解決策を見逃していたので、その場合は、その他の投稿へのリンクを教えていただけますか?
docker - ホストからマウントするコンテナでバイナリを実行するソリューションはありますか?
私の場合、Unix ベースのホストにssmtpパッケージをインストールしました。何らかの理由で、私の状況での最善の方法は、ホストで ssmtp バイナリ (/usr/sbin の下) を使用して、APP コンテナーでメール (html ファイル) を送信することです。
ホスト ディレクトリ /usr/bin をコンテナーにマウントしようとしました。
ssmtp を実行してみてください。いくつかの厄介な試行とその結果を次に示します。
私のAPPコンテナと/host_sbinの下
だから、物事は私が思うほど単純ではないようだ。誰かがこのようなことをして、解決策を私と共有できますか? そして、誰かがそれがうまくいかない理由を説明していただければ幸いです。
linux - Linux 構成 -- ssmtp: smtp.gmail.com:587 を開けません
こんにちは、ssmtp-2.61-22.el5.i386.rpm がインストールされた RHEL5 を使用しています。
私の /etc/ssmtp/ssmtp.conf は以下のように更新されました:-
また、以下のように更新されたリエイリアス:
sendmail サービスをシャットダウンしました
ssmtp でメールを送信しようとすると、以下のエラーが表示されます
このエラーで多くのタグを検索しましたが、これを修正できません
私のシステムはポート 587 で smtp.gmail.com に接続できます
これを修正した人はいますか?提案してください
php - sSMTP が機能しなくなりました - 「無効な応答: 501 5.5.4 HELO/EHLO 引数 MYEMAILADDRESS@gmail.com が無効です。接続を閉じています。」
タイトル/タグが示すように、私は PHP サーバー用に Linux で sSMTP を実行しています。
メールを送信しようとすると、これらのエラーが表示されます (PHP には表示されず、ログ/「sudo service sendmail status」または「sudo service php5-fpm status」にのみ表示されます)。
/var/log/mail.log から
/var/log/mail.err および mail.warn から
私の /etc/ssmtp/ssmtp.conf
私のリエイリアス
bash - コマンドラインからGmailアカウントにメールを送信できません.
必要なすべての詳細を使用して ssmtp.conf ファイルを編集し、 ssmtp を構成しました! しかし、私が入るとき
ターミナルでは、このエラーが表示されます!!
親切に私を助けて
(PS: Fedora 7 を使用し、Centos と同様のコマンド)
sendgrid - sendgrid をリレーするように sSMTP を構成するスマートホスト構成
「明確な問題ステートメント」は How to configure sSMTP to Relay sendgrid as smarthost ですか?
デフォルトの sSMTP 構成は次のとおりです::
Exim4 では、次の構成を使用して SMTP をスマートホストとして構成できます (動作しています)::
python - python file.close() not closing ssmtp.conf (I think?)
My python program is sort of a setup manager for using ssmtp
to send emails.
so prior to running the program I get the necessary installs:
After installing those three things the next step in sending emails is to edit the file /etc/ssmtp/ssmtp.conf
and add your email address and password along with some other pieces of information:
And this is where the complications start. I know this configuration works and I can test and prove it. but in my python code I open the file "/etc/ssmtp/ssmtp.conf" by doing:
(My reason for doing this is for the program to act as an install manager of sorts where it asks the user to enter their email address and password and then it writes it in to the correct part of ssmtp.conf)
After writing to the file I close:
With that being completed, I should be ready to send an email. In order to send an email you run this command:
But this does not work. I get an error that says:
mail: cannot send message: Process exited with a non-zero status
In trying to figure out what was wrong I determined that if you open the file using:
And it sends the email to my phone no problem...
I do not understand why this doesn't work.
Thanks to all that answer in advance!
ssmtp.conf before running the program (I am leaving out all the comments):
ssmtp.conf after running the program: