Overslaan naar inhoud
  • +31 653-919-302
Cafayate.Net
  • 0
  • 0
  • Aanmelden
  • Nederlands English (US) Español (AR)
  • Contact
  • Startpagina
  • Blog
  • Vacatures
  • Contact
Cafayate.Net
  • 0
  • 0
    • Startpagina
    • Blog
    • Vacatures
    • Contact
  • +31 653-919-302
  • Nederlands English (US) Español (AR)
  • Aanmelden
  • Contact

CONFIGURE POSTFIX/SENDMAIL FOR PHP MAIL() IN UBUNTU

  • Alle blogs
  • Tech Blog
  • CONFIGURE POSTFIX/SENDMAIL FOR PHP MAIL() IN UBUNTU
  • 5 maart 2021 in
    Administrator

    Actually configure Postfix or Sendmail for PHP mail() is the same. Both of them run the /usr/sbin/sendmail binary. It is quite confusing if we just look at the name of the binary but this is what Postfix did.

    For more information, take a look at the Postfix Manual – sendmail.

    For the PHP setting, open the /etc/php5/apache2/php.ini and configure the sendmail_path.
    php.ini

    1
    2
    3
    ; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
    ; http://php.net/sendmail-path
    sendmail_path = "/usr/sbin/sendmail -t -i"

     

    Save the file and restart the Apache server.

    Try testing the PHP mail() function by the following command.

    1
    echo testing | mail -s Bla [email protected]

     

    If you need to send with attachment. you can refer to this post.
    PHP – Send Attachment with PHP mail()

     

    in Tech Blog
    Ansible and WordPress: roles and playbooks

    Ontworpen voor bedrijven

    We zijn een team van gepassioneerde mensen met als doel levens te verbeteren met vernieuwende producten. We ontwikkelen geweldige oplossingen voor al je zakelijke uitdagingen. Onze producten zijn ontworpen voor kleine tot middelgrote bedrijven die hun prestaties willen optimaliseren.

    Neem contact op

    Plantexel
    Pedernera
    Salta Capital 
    Argentina

    • +31 653-919-302
    • [email protected]
    Volg ons
    Copyright © Plantexel
    Nederlands | English (US) | Español (AR)