Skip to content

Kévin Dunglas

Founder of Les-Tilleuls.coop (worker-owned cooperative). Creator of API Platform, Mercure.rocks, Vulcain.rocks and of some Symfony components.

Menu
  • Talks
  • Resume
  • Sponsor me
  • Contact
Menu

Faire fonctionner PHP mail() sous Debian et dérivés

Posted on July 15, 2008July 27, 2008 by Kévin Dunglas

Peut-être avez-vous remarqué que l’envoi de mail en PHP ne fonctionne pas après une installation standard de Debian ou de Ubuntu. Pourtant, Debian fournie le serveur de mail exim qui fait partie de la base du système.

Le problème est que la configuration initiale d’exim l’empêche d’envoyer des mails vers l’extérieur. Le remère est des plus simple :

  1. Tapez connecté en tant que root dpkg-reconfigure exim4-config (sudo dpkg-reconfigure exim4-config sous Ubuntu).
  2. Choisissez comme type de configuration Envoi via relais (« smarthost ») – réception SMTP ou fetchmail
  3. Entrez l’adresse du serveur SMTP de votre fournisseur d’accès à internet pour Nom réseau ou adresse IP du sysème « smarthost »

Vous pouvez sélectionner les paramètres par défaut proposé pour les autres options.

Cela suffira pour activer l’envoi de mail avec PHP sans se soucier de la configuration complète d’un MTA. Les emails envoyés avec la fonction mail() arriveront même sur les boîtes Hotmail (qui nécessite une configuration particulière du serveur) car notre serveur local transmettra juste la demande d’envoi au serveur de notre FAI.

Si vous souhaitez installer un véritable serveur de mail sur votre serveur je vous conseil de jetter un oeil à Postfix.

Related posts:

  1. hosting.py: un gestionnaire de serveur web pour Debian/Ubuntu
  2. hosting.py: Debian/Ubuntu webserver administration tool
  3. Installer un stack LAMP sur un dédié OVH avec Ubuntu 12.10
  4. Nouvelle offre d’hébergement à bas prix chez Gandi : installez votre serveur web

2 thoughts on “Faire fonctionner PHP mail() sous Debian et dérivés”

  1. Pingback: Anonymous
  2. rachatdecredit says:
    June 1, 2011 at 11:02 pm

    Super article,Merci

    Reply

Leave a Reply Cancel reply

Follow me on Twitter

My Tweets

Subscribe to this blog

Recent Posts

  • Read the Linux Manual Pages on Mac and BSD, Directly From the Terminal
  • Ne vous lamentez pas, organisez-vous !
  • FrankenPHP: The Modern Php App Server, written in Go
  • API Platform 3 Is Released!
  • Mercure 0.14: Major Performance Improvement and New Features

Top Posts & Pages

  • Securely Access Private Git Repositories and Composer Packages in Docker Builds
  • JSON Columns and Doctrine DBAL 3 Upgrade
  • Preventing CORS Preflight Requests Using Content Negotiation
  • Symfony's New Native Docker Support (Symfony World)
  • FrankenPHP: The Modern Php App Server, written in Go
  • Goroutines, threads, and thread IDs
  • Generate a Symfony password hash from the command line
  • API Platform 3 Is Released!
  • Connection to a MS SQL Server from Symfony / Doctrine on Mac or Linux
  • Vulcain: HTTP/2 Server Push
 and the rise of client-driven REST APIs

Persistence in PHP with the Doctrine ORM

Persistence in PHP with the Doctrine ORM

Tags

Apache API API Platform Buzz Caddy Docker Doctrine Go Google GraphQL HTTP/2 Hydra hypermedia Hébergement Javascript JSON-LD Kubernetes La Coopérative des Tilleuls Les-Tilleuls.coop Lille Linux Mac Mercure Mercure.rocks Messagerie Instantanée MySQL PHP Punk Rock Python React REST Rock'n'Roll RSS Schema.org Security SEO SEO Symfony Symfony Live Sécurité Ubuntu Web 2.0 Wordpress XHTML XML

Archives

Categories

  • DevOps (25)
  • Mercure (4)
  • Opinions (91)
  • Programming (185)
    • Android (5)
    • Go (13)
    • JavaScript (43)
    • PHP (143)
      • API Platform (65)
      • Symfony (89)
    • Python (14)
      • Django (5)
  • Security (15)
  • SEO (24)
  • Talks (39)
  • Ubuntu (68)
  • Wordpress (6)

Social

  • Mastodon
  • Twitter
  • LinkedIn
  • YouTube
  • GitHub

Links

  • API Platform
  • Les-Tilleuls.coop
  • Mercure.rocks
  • Vulcain.rocks
© 2023 Kévin Dunglas | Powered by Minimalist Blog WordPress Theme