{"id":1681,"date":"2021-05-14T13:29:32","date_gmt":"2021-05-14T11:29:32","guid":{"rendered":"https:\/\/ekiwi.de\/?p=1681"},"modified":"2021-05-14T13:29:32","modified_gmt":"2021-05-14T11:29:32","slug":"phpmailer-sendet-nicht-could-not-execute-usr-sbin-sendmail-t-i","status":"publish","type":"post","link":"https:\/\/ekiwi.de\/index.php\/1681\/phpmailer-sendet-nicht-could-not-execute-usr-sbin-sendmail-t-i\/","title":{"rendered":"PHPMailer sendet nicht: Could not execute: \/usr\/sbin\/sendmail -t -i"},"content":{"rendered":"<p>Was tun, wenn der PHPMailer nicht will. Ein paar L\u00f6sungsans\u00e4tze.<\/p>\n<p><!--more--><\/p>\n<p>Mails mit PHP zu versenden ist so eine Sache. Es gibt viel Fallstricke und je nach Hoster sind weitere Einstellungen n\u00f6tig. Ich bin selbst bei Hosteurope und  bisher klappte der Mailversand ohne gro\u00dfe Probleme. Neuerdings bin ich aber immer \u00f6fter in ein Problem gelaufen, dass der Versand \u00fcber den PHPMailer nur zu einer Fehlermeldung f\u00fchrte.<\/p>\n<pre>\r\nMessage could not be sent. Mailer Error: Could not execute: \/usr\/sbin\/sendmail -t -i\r\n<\/pre>\n<p>Die Sache betrifft nur den lokalen Mailversand, also Sendmail. Anscheinend schl\u00e4gt der Mailversand neurdings fehl, wenn E-Mail-Adressen verwendet werden, welche es nicht gibt:<\/p>\n<pre>\r\n$mail->setFrom('info@ekiwi-blog.de');\r\n$mail->addAddress('andy.dunkel@ekiwi.de');\r\n<\/pre>\n<p>Dies klappt, weil es die E-Mail-Adresse im &#8222;From&#8220; gibt. Verwende ich z.B. <\/p>\n<pre>\r\n$mail->setFrom('gibtesnicht@ekiwi-blog.de');\r\n<\/pre>\n<p>Dann tritt der Fehler wieder auf, da die Mailadresse nicht existiert. Je nach Provider ist es also wichtig, dass die E-Mail-Adresse tats\u00e4chlich vorhanden ist. Dies ist auch sinnvoll, somit ist der Versand nur m\u00f6glich, wenn es eine echte E-Mail-Adresse dazu gibt.<\/p>","protected":false},"excerpt":{"rendered":"<p>Was tun, wenn der PHPMailer nicht will. Ein paar L\u00f6sungsans\u00e4tze.<\/p>\n","protected":false},"author":1,"featured_media":80,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"categories":[14],"tags":[29,31,30],"class_list":["post-1681","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php","tag-mail","tag-php","tag-server"],"_links":{"self":[{"href":"https:\/\/ekiwi.de\/index.php\/wp-json\/wp\/v2\/posts\/1681","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ekiwi.de\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ekiwi.de\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ekiwi.de\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ekiwi.de\/index.php\/wp-json\/wp\/v2\/comments?post=1681"}],"version-history":[{"count":0,"href":"https:\/\/ekiwi.de\/index.php\/wp-json\/wp\/v2\/posts\/1681\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ekiwi.de\/index.php\/wp-json\/wp\/v2\/media\/80"}],"wp:attachment":[{"href":"https:\/\/ekiwi.de\/index.php\/wp-json\/wp\/v2\/media?parent=1681"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ekiwi.de\/index.php\/wp-json\/wp\/v2\/categories?post=1681"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ekiwi.de\/index.php\/wp-json\/wp\/v2\/tags?post=1681"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}