yapılandırmasıyla ilgili yardıma ihtiyacım var. Güncelleme: Çözdüm. Aşağıda belgelenmiş her şey.Çalışmak için PHP mail() nasıl alabilirim? Bir MTA
Çok fazla şey denedim, ancak işe yaramıyordu.
Kullanarak, postfix, exim4 veya sendmail kullanmaz. Sadece adım adım kılavuza ve ne yaptığımın açıklamasına ihtiyacım var. Ayrıca e-posta için Google Apps kullanıyorum.
Düzenleme:
mail.log
Nov 3 01:14:02 mugbear postfix[16615]: error: to submit mail, use the Postfix sendmail command
Nov 3 01:14:02 mugbear postfix[16615]: fatal: the postfix command is reserved for the superuser
bu ne anlama geliyor?
Güncelleme düzenlemek için: sendmail_path = /usr/sbin/sendmail -t -i
EDIT2 ile php.ini içinde sendmail_path düzelterek Sabit: PHP - Sadece belgelerinden yakaladı. FYI, e-postanı kaldırdım.
<?php
// The message
$message = "Line 1\nLine 2\nLine 3";
// In case any of our lines are larger than 70 characters, we should use wordwrap()
$message = wordwrap($message, 70);
// Send
mail('[email protected]', 'My Subject', $message);
?>
Edit3: Başka hatası: Edit3 için
Nov 3 07:22:29 mugbear postfix/postdrop[17131]: warning: unable to look up public/pickup: No such file or directory
Nov 3 07:22:29 mugbear postfix/postdrop[17133]: warning: unable to look up public/pickup: No such file or directory
Güncelleme: http://ubuntuforums.org/showthread.php?t=666018 çalıştırın bu:
sudo mkfifo /var/spool/postfix/public/pickup
sudo /etc/init.d/postfix restart
Bundan sonra aşağıdaki bağlantıyı kullanarak bu düzeltildi , bu e alırsın rror:
postfix/master[13902]: fatal: bind 0.0.0.0 port 25: Address already in use
Sonra örneğin, süreçleri kontrol ve sendmail süreçleri öldürmek zorunda:
[email protected]:/etc/postfix# ps aux | grep mail
root 23554 0.0 0.0 8232 1900 ? Ss 10:17 0:00 sendmail: MTA: accepting connections
root 27308 0.0 0.0 3004 764 pts/0 S+ 10:30 0:00 grep mail
[email protected]:/etc/postfix# kill 23554
Edit4: bu ne anlama geliyor? edit4 için
Nov 3 07:34:51 mugbear postfix/pickup[17309]: 6602F1C151: uid=33 from=<www-data>
Nov 3 07:34:51 mugbear postfix/cleanup[17311]: 6602F1C151: message-id=<[email protected]>
Nov 3 07:34:51 mugbear postfix/qmgr[17310]: 6602F1C151: from=<[email protected]>, size=397, nrcpt=1 (queue active)
Nov 3 07:34:51 mugbear postfix/error[17321]: 6602F1C151: to=<[email protected]>, relay=none, delay=0.03, delays=0.02/0/0/0.01, dsn=4.3.5, status=deferred (delivery temporarily suspended: Host or domain name not found. Name service error for name=xen.prgmr.com type=A: Host found but no data record of requested type)
Güncelleme: Ben, dpkg-reconfigure postfix
koştu ve Internet Site
seçilmiş.
da php istemci http://setahost.com/installing-postfix-as-a-default-mail-sending-program-with-php/
takip istemci kurulum talimatları için tam sunucu/istemci kurulum talimatları ve ... Bana bir çeşit rehberlik mi veriyorsun? – Strawberry
Bunu nasıl yapacağımı unuttuğumda standart CentOS talimatlarını takip ediyorum. Postfix'i şununla birlikte yapılandırmak oldukça kolaydır. Bunu yapmak için bir Debian rehberi olmalı. Yine de, sorunun ne olduğunu görmek için httpd hata günlüğüne ve posta günlüğüne bakmanız gerekiyor. PHP'nin göndermeye çalışırken (eksik: genellikle suçlu) veya MTA konfigürasyon problemi (çoğu zaman, MTA'yı doğrudan uzak uça bağlanacak şekilde yapılandırmanız gerektiğinde) aklıma gelen iki problemin üstbilgileri eksik.). – mpdonadio
Posta günlüklerini edit2'imde, apache'de hiçbir şey gönderemem. – Strawberry