De terminalopdrachtwhich msmtp
zou je moeten vertellen waar het uitvoerbare bestand staat.
Als ik sendmail_path = /usr/local/bin/msmtp -t in het bestand zet, geeft hij aan dat de commando niet bestaat.
ik heb nu geprobeerd met sendmail voor elkaar te krijgen op deze manier:
sendmail_path = /usr/local/bin/sendmail -t
De mailfunctie heb ik getest met een document waar de volgende gegevens in staan:
<?php
$to = "phospers@gmail.com";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "pheros@live.nl";
$headers = "From:" . $from;
if(mail($to, $subject, $message, $headers)) {
echo 'Mail Sent';
} else {
print "Error";
}
?>
Bij het uitvoeren van de pagina krijg ik na lange tijd laden de volgende tekst te zien:
Mail Sent
Echter komt de mail nooit aan.
Wat mis ik nog?
Dit is mijn gehele mail function gedeelte:
[mail function]
; For Win32 only.
; http://php.net/smtp
; SMTP = localhost
; http://php.net/smtp-port
; smtp_port = 25
; For Win32 only.
; http://phenw.net/sendmail-from
; sendmail_from = me@examlpe.com
; For Unix only. You may supply arguments as well (default: "sendmail -t -i")
; http://php.net/sendmail-path
sendmail_path = /usr/sbin/sendmail -t
; Force the addition of the specified parameters to be passed as extr
; to the sendmail binary. These parameters will always replace the value of
; the 5th paramater 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
; Log all mail() calls including the full path of the script, line #, to address and headers
;mail.log =
Ik heb sendmail nog niet geconfigureerd.
Als ik nog iets vergeten ben lees ik graag wat ik vergeten ben te doen en hoe ik dat het beste kan doen.
Bij voorbaat dank voor de info.