Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can send mail from localhost with sendmail package , sendmail package is inbuild in XAMPP. So if you are using XAMPP then you can easily send mail from localhost.</p> <p>for example you can configure <code>C:\xampp\php\php.ini</code> and <code>c:\xampp\sendmail\sendmail.ini</code> for gmail to send mail.</p> <p>in <code>C:\xampp\php\php.ini</code> find <code>extension=php_openssl.dll</code> and remove the semicolon from the beginning of that line to make SSL working for gmail for localhost.</p> <p>in php.ini file find <code>[mail function]</code> and change</p> <pre><code>SMTP=smtp.gmail.com smtp_port=587 sendmail_from = my-gmail-id@gmail.com sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t" </code></pre> <p>Now Open <code>C:\xampp\sendmail\sendmail.ini</code>. Replace all the existing code in sendmail.ini with following code</p> <pre><code>[sendmail] smtp_server=smtp.gmail.com smtp_port=587 error_logfile=error.log debug_logfile=debug.log auth_username=my-gmail-id@gmail.com auth_password=my-gmail-password force_sender=my-gmail-id@gmail.com </code></pre> <p>Now you have done!! create php file with mail function and send mail from localhost.</p> <p>PS: don't forgot to replace <strong>my-gmail-id</strong> and <strong>my-gmail-password</strong> in above code. Also, don't forget to remove duplicate keys if you copied settings from above. For example comment following line if there is another <strong>sendmail_path</strong> : <code>sendmail_path="C:\xampp\mailtodisk\mailtodisk.exe"</code> in the php.ini file</p> <p>Also remember to restart the server using the XAMMP control panel so the changes take effect.</p> <p>For gmail please check <a href="https://support.google.com/accounts/answer/6010255" rel="noreferrer">https://support.google.com/accounts/answer/6010255</a> to allow access from less secure apps.</p> <blockquote> <p>To send email on Linux (with sendmail package) through Gmail from localhost please check <a href="https://stackoverflow.com/questions/33969783/phpubuntu-send-email-using-gmail-form-localhost/45125490#45125490">PHP+Ubuntu Send email using gmail form localhost</a>.</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload