Problème mail()
jim2k
Messages postés
21
Date d'inscription
Statut
Membre
Dernière intervention
-
Utilisateur anonyme -
Utilisateur anonyme -
Bonjour,
je n'arrive pas à utiliser la fonction mail() en php !
Je suis donc en local.
voici le code :
<?php
if (mail("mon_mail@mail.com", "sujet", "message"))
echo "msg envoye";
else
echo "failed";
?>
ou mon_mail est bien par le mien :p
j'ai ouvert le port 25 pour la redirection smtp.
je suis chez free.
quand je fais -postqueue -p la liste ne cesse de s'agrandir et ne se vide jamais !
un petit postconf -n :
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
inet_interfaces = all
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
mydestination = difix, localhost.localdomain, localhost
myhostname = test
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
readme_directory = no
recipient_delimiter = +
relayhost = smtp.free.fr
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
cat /var/log/apache2/error.log :
sendmail: warning: dict_open_dlinfo: cannot open /etc/postfix/dynamicmaps.cf. No dynamic maps will be allowed.
postdrop: warning: dict_open_dlinfo: cannot open /etc/postfix/dynamicmaps.cf. No dynamic maps will be allowed.
postdrop: warning: unable to look up public/pickup: No such file or directory
ça fait 3 jours que je cherche besoin d'aide :/
merci !
je n'arrive pas à utiliser la fonction mail() en php !
Je suis donc en local.
voici le code :
<?php
if (mail("mon_mail@mail.com", "sujet", "message"))
echo "msg envoye";
else
echo "failed";
?>
ou mon_mail est bien par le mien :p
j'ai ouvert le port 25 pour la redirection smtp.
je suis chez free.
quand je fais -postqueue -p la liste ne cesse de s'agrandir et ne se vide jamais !
un petit postconf -n :
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
inet_interfaces = all
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
mydestination = difix, localhost.localdomain, localhost
myhostname = test
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
readme_directory = no
recipient_delimiter = +
relayhost = smtp.free.fr
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
cat /var/log/apache2/error.log :
sendmail: warning: dict_open_dlinfo: cannot open /etc/postfix/dynamicmaps.cf. No dynamic maps will be allowed.
postdrop: warning: dict_open_dlinfo: cannot open /etc/postfix/dynamicmaps.cf. No dynamic maps will be allowed.
postdrop: warning: unable to look up public/pickup: No such file or directory
ça fait 3 jours que je cherche besoin d'aide :/
merci !
A voir également:
- Problème mail()
- Publipostage mail - Accueil - Word
- Windows live mail - Télécharger - Mail
- Créer une adresse mail hotmail - Guide
- Comment télécharger un mail - Guide
- Cegetel mail ✓ - Forum Mail
2 réponses
Bonjour,
en local, sans l'installation d'un serveur de courrier tu ne pourras rien envoyer, mais ça doit fonctionner sur l'hebergement, si la fonction mail() y est autorisée
cdt
en local, sans l'installation d'un serveur de courrier tu ne pourras rien envoyer, mais ça doit fonctionner sur l'hebergement, si la fonction mail() y est autorisée
cdt