sending php mail from localhost





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







1















I have installed php, mySQL, postfix and sendmail and have set up a simple email script on my local host server. mail() returns 1 (TRUE) when I send an e-mail, however the email does not arrive at the destination.



Installation



The mail functions are part of the PHP core. There is no installation needed to use these functions.



Requirements



For the mail functions to be available, PHP requires an installed and working email system. The program to be used is defined by the configuration settings in the php.ini file.



Runtime Configuration
The behavior of the mail functions is affected by settings in the php.ini file.



Mail configuration options:



Name            Default     Description                                         Changeable
sendmail_path NULL Unix systems only: Specifies where the sendmail
program can be found (usually /usr/sbin/sendmail
or /usr/lib/sendmail) PHP_INI_SYSTEM


I found it at /usr/lib/sendmail however, I can not find the configuration file, which is where I assume my problem is, as I have not told anything which server I am using to send my mail through.



If anyone can help me I would be grateful.










share|improve this question























  • I hope this one is easy for you. kvcodes.com/2016/03/send-e-mail-localhost-ubuntu-php

    – Kvvaradha
    Mar 18 '16 at 5:15


















1















I have installed php, mySQL, postfix and sendmail and have set up a simple email script on my local host server. mail() returns 1 (TRUE) when I send an e-mail, however the email does not arrive at the destination.



Installation



The mail functions are part of the PHP core. There is no installation needed to use these functions.



Requirements



For the mail functions to be available, PHP requires an installed and working email system. The program to be used is defined by the configuration settings in the php.ini file.



Runtime Configuration
The behavior of the mail functions is affected by settings in the php.ini file.



Mail configuration options:



Name            Default     Description                                         Changeable
sendmail_path NULL Unix systems only: Specifies where the sendmail
program can be found (usually /usr/sbin/sendmail
or /usr/lib/sendmail) PHP_INI_SYSTEM


I found it at /usr/lib/sendmail however, I can not find the configuration file, which is where I assume my problem is, as I have not told anything which server I am using to send my mail through.



If anyone can help me I would be grateful.










share|improve this question























  • I hope this one is easy for you. kvcodes.com/2016/03/send-e-mail-localhost-ubuntu-php

    – Kvvaradha
    Mar 18 '16 at 5:15














1












1








1


2






I have installed php, mySQL, postfix and sendmail and have set up a simple email script on my local host server. mail() returns 1 (TRUE) when I send an e-mail, however the email does not arrive at the destination.



Installation



The mail functions are part of the PHP core. There is no installation needed to use these functions.



Requirements



For the mail functions to be available, PHP requires an installed and working email system. The program to be used is defined by the configuration settings in the php.ini file.



Runtime Configuration
The behavior of the mail functions is affected by settings in the php.ini file.



Mail configuration options:



Name            Default     Description                                         Changeable
sendmail_path NULL Unix systems only: Specifies where the sendmail
program can be found (usually /usr/sbin/sendmail
or /usr/lib/sendmail) PHP_INI_SYSTEM


I found it at /usr/lib/sendmail however, I can not find the configuration file, which is where I assume my problem is, as I have not told anything which server I am using to send my mail through.



If anyone can help me I would be grateful.










share|improve this question














I have installed php, mySQL, postfix and sendmail and have set up a simple email script on my local host server. mail() returns 1 (TRUE) when I send an e-mail, however the email does not arrive at the destination.



Installation



The mail functions are part of the PHP core. There is no installation needed to use these functions.



Requirements



For the mail functions to be available, PHP requires an installed and working email system. The program to be used is defined by the configuration settings in the php.ini file.



Runtime Configuration
The behavior of the mail functions is affected by settings in the php.ini file.



Mail configuration options:



Name            Default     Description                                         Changeable
sendmail_path NULL Unix systems only: Specifies where the sendmail
program can be found (usually /usr/sbin/sendmail
or /usr/lib/sendmail) PHP_INI_SYSTEM


I found it at /usr/lib/sendmail however, I can not find the configuration file, which is where I assume my problem is, as I have not told anything which server I am using to send my mail through.



If anyone can help me I would be grateful.







php email mail postfix






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jun 30 '13 at 14:50









SimplySimonSimplySimon

3,89072750




3,89072750













  • I hope this one is easy for you. kvcodes.com/2016/03/send-e-mail-localhost-ubuntu-php

    – Kvvaradha
    Mar 18 '16 at 5:15



















  • I hope this one is easy for you. kvcodes.com/2016/03/send-e-mail-localhost-ubuntu-php

    – Kvvaradha
    Mar 18 '16 at 5:15

















I hope this one is easy for you. kvcodes.com/2016/03/send-e-mail-localhost-ubuntu-php

– Kvvaradha
Mar 18 '16 at 5:15





I hope this one is easy for you. kvcodes.com/2016/03/send-e-mail-localhost-ubuntu-php

– Kvvaradha
Mar 18 '16 at 5:15










3 Answers
3






active

oldest

votes


















3














You should not have both Postfix and Sendmail installed at the same time. Postfix is a replacement for Sendmail.



So remove Sendmail (because Postfix is easier to use):



sudo apt-get remove sendmail


Then you should reconfigure Postfix.



 sudo dpkg-reconfigure postfix


There is a very good guide here: https://help.ubuntu.com/community/Postfix



This will probably solve your problem.






share|improve this answer
























  • Thanks for that, I was tying myself in knots trying to sort it out :)

    – SimplySimon
    Jul 1 '13 at 8:36



















0














To send email through Gmail from localhost please check PHP+Ubuntu Send email using gmail form localhost is possible another answer.






share|improve this answer































    0














    Another way of send mail Here...
    Send mail From Your account to Any email in PHP...
    Use (PHP-Mailer) function ,It's set of Php-codes(library) Form Online(hithup) to download to make easily configure to (google apps For mail send) set the setting enable on (Less-secure app-in google mail) thats like use your mail account to send the mail. If you any doubts view use youtube video for PHP-Mailer function.
    Thanks.






    share|improve this answer








    New contributor




    manoji is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





















      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "89"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f314664%2fsending-php-mail-from-localhost%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      3














      You should not have both Postfix and Sendmail installed at the same time. Postfix is a replacement for Sendmail.



      So remove Sendmail (because Postfix is easier to use):



      sudo apt-get remove sendmail


      Then you should reconfigure Postfix.



       sudo dpkg-reconfigure postfix


      There is a very good guide here: https://help.ubuntu.com/community/Postfix



      This will probably solve your problem.






      share|improve this answer
























      • Thanks for that, I was tying myself in knots trying to sort it out :)

        – SimplySimon
        Jul 1 '13 at 8:36
















      3














      You should not have both Postfix and Sendmail installed at the same time. Postfix is a replacement for Sendmail.



      So remove Sendmail (because Postfix is easier to use):



      sudo apt-get remove sendmail


      Then you should reconfigure Postfix.



       sudo dpkg-reconfigure postfix


      There is a very good guide here: https://help.ubuntu.com/community/Postfix



      This will probably solve your problem.






      share|improve this answer
























      • Thanks for that, I was tying myself in knots trying to sort it out :)

        – SimplySimon
        Jul 1 '13 at 8:36














      3












      3








      3







      You should not have both Postfix and Sendmail installed at the same time. Postfix is a replacement for Sendmail.



      So remove Sendmail (because Postfix is easier to use):



      sudo apt-get remove sendmail


      Then you should reconfigure Postfix.



       sudo dpkg-reconfigure postfix


      There is a very good guide here: https://help.ubuntu.com/community/Postfix



      This will probably solve your problem.






      share|improve this answer













      You should not have both Postfix and Sendmail installed at the same time. Postfix is a replacement for Sendmail.



      So remove Sendmail (because Postfix is easier to use):



      sudo apt-get remove sendmail


      Then you should reconfigure Postfix.



       sudo dpkg-reconfigure postfix


      There is a very good guide here: https://help.ubuntu.com/community/Postfix



      This will probably solve your problem.







      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Jun 30 '13 at 21:30









      user1912424user1912424

      388124




      388124













      • Thanks for that, I was tying myself in knots trying to sort it out :)

        – SimplySimon
        Jul 1 '13 at 8:36



















      • Thanks for that, I was tying myself in knots trying to sort it out :)

        – SimplySimon
        Jul 1 '13 at 8:36

















      Thanks for that, I was tying myself in knots trying to sort it out :)

      – SimplySimon
      Jul 1 '13 at 8:36





      Thanks for that, I was tying myself in knots trying to sort it out :)

      – SimplySimon
      Jul 1 '13 at 8:36













      0














      To send email through Gmail from localhost please check PHP+Ubuntu Send email using gmail form localhost is possible another answer.






      share|improve this answer




























        0














        To send email through Gmail from localhost please check PHP+Ubuntu Send email using gmail form localhost is possible another answer.






        share|improve this answer


























          0












          0








          0







          To send email through Gmail from localhost please check PHP+Ubuntu Send email using gmail form localhost is possible another answer.






          share|improve this answer













          To send email through Gmail from localhost please check PHP+Ubuntu Send email using gmail form localhost is possible another answer.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jul 16 '17 at 6:00









          Vikas DwivediVikas Dwivedi

          18915




          18915























              0














              Another way of send mail Here...
              Send mail From Your account to Any email in PHP...
              Use (PHP-Mailer) function ,It's set of Php-codes(library) Form Online(hithup) to download to make easily configure to (google apps For mail send) set the setting enable on (Less-secure app-in google mail) thats like use your mail account to send the mail. If you any doubts view use youtube video for PHP-Mailer function.
              Thanks.






              share|improve this answer








              New contributor




              manoji is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.

























                0














                Another way of send mail Here...
                Send mail From Your account to Any email in PHP...
                Use (PHP-Mailer) function ,It's set of Php-codes(library) Form Online(hithup) to download to make easily configure to (google apps For mail send) set the setting enable on (Less-secure app-in google mail) thats like use your mail account to send the mail. If you any doubts view use youtube video for PHP-Mailer function.
                Thanks.






                share|improve this answer








                New contributor




                manoji is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.























                  0












                  0








                  0







                  Another way of send mail Here...
                  Send mail From Your account to Any email in PHP...
                  Use (PHP-Mailer) function ,It's set of Php-codes(library) Form Online(hithup) to download to make easily configure to (google apps For mail send) set the setting enable on (Less-secure app-in google mail) thats like use your mail account to send the mail. If you any doubts view use youtube video for PHP-Mailer function.
                  Thanks.






                  share|improve this answer








                  New contributor




                  manoji is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.










                  Another way of send mail Here...
                  Send mail From Your account to Any email in PHP...
                  Use (PHP-Mailer) function ,It's set of Php-codes(library) Form Online(hithup) to download to make easily configure to (google apps For mail send) set the setting enable on (Less-secure app-in google mail) thats like use your mail account to send the mail. If you any doubts view use youtube video for PHP-Mailer function.
                  Thanks.







                  share|improve this answer








                  New contributor




                  manoji is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  share|improve this answer



                  share|improve this answer






                  New contributor




                  manoji is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  answered 11 mins ago









                  manojimanoji

                  11




                  11




                  New contributor




                  manoji is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.





                  New contributor





                  manoji is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.






                  manoji is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Ask Ubuntu!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f314664%2fsending-php-mail-from-localhost%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      GameSpot

                      日野市

                      Tu-95轟炸機