Hallo Thomas,

könnte es sein, dass in deiner config der "user" nicht stimmt?
Sollte das nicht eine gmail Adresse sein?

Grüße,
Martin

Thomas Schmidt <[email protected]> wrote:

> Hallo liebe Liste!
> 
> Meine PHP-Seiten sollen über Google Mail ihre Nachrichten senden. Ich
> möchte aber nicht in jedem Webspace das selbe SMTP-Passwort eingeben.
> Also dachte ich, nutze ich das gute alte PHP mail().
> 
> Ich habe msmtp als MTA installiert und konfiguriert:
> 
> # cat /etc/msmtprc
> account gmail
> tls on
> tls_certcheck off
> auth on
> host smtp.gmail.com
> port 587
> user [email protected]
> from [email protected]
> password 5fdsg85df8g
> 
> 
> Auf der Kommandozeile kann ich Mails versenden, das
> geht so halbwegs.
> 
> Dann wollte ich PHP anbinden. Der mail()-Befehl meldet einfach false
> zurück, und ich kann nicht herausfinden warum. Es gibt keine
> Fehlermeldung von PHP aus.
> 
> Könnt ihr mir beim Debuggen helfen?
> 
> 
> # tail /var/log/php-mail.log
> [18-Sep-2015 11:59:32 Europe/Berlin] mail() on
> [/www/path/html/mailtest.php:7]: To: schmidt@netaction
> .de -- Headers:
> 
> 
> # more /etc/php5/apache2/php.ini
> [mail function]
> ; For Win32 only.
> ; http://php.net/smtp
> SMTP = localhost
> ; http://php.net/smtp-port
> smtp_port = 25
> 
> ; For Win32 only.
> ; http://php.net/sendmail-from
> ;sendmail_from = [email protected]
> 
> ; For Unix only.  You may supply arguments as well (default:
> "sendmail -t -i"). ; http://php.net/sendmail-path
> ;sendmail_path =
> sendmail_path = "/usr/bin/msmtp -C /etc/msmtprc --logfile
> /var/log/msmtp.log -a gmail -t"
> 
> 
> ; Force the addition of the specified parameters to be passed as extra
> parameters
> ; to the sendmail binary. These parameters will always replace the
> value of ; the 5th parameter to mail(), even in safe mode.
> ;mail.force_extra_parameters =
> 
> ; Add X-PHP-Originating-Script: that will include uid of the script
> followed by the filename
> mail.add_x_header = On
> 
> ; The path to a log file that will log all mail() calls. Log entries
> include ; the full path of the script, line number, To address and
> headers. mail.log = /var/log/php-mail.log
> ; Log mail to syslog (Event Log on NT, not valid in Windows 95).
> ;mail.log = syslog
> 
> _______________________________________________
> Lug-dd maillist  -  [email protected]
> https://ssl.schlittermann.de/mailman/listinfo/lug-dd

_______________________________________________
Lug-dd maillist  -  [email protected]
https://ssl.schlittermann.de/mailman/listinfo/lug-dd

Antwort per Email an