![]() ![]() This code is used for the mail from your localhost XAMPP and your Gmail account. Localhost please check PHP Ubuntu Send email using gmail form To send email on Linux (with sendmail package) through Gmail from For example comment following line if there is another sendmail_path : sendmail_path="C:\xampp\mailtodisk\mailtodisk.exe" in the php.ini fileĪlso remember to restart the server using the XAMMP control panel so the changes take effect.įor gmail please check to allow access from less secure apps. PS: don't forgot to replace my-gmail-id and my-gmail-password in above code.Īlso, don't forget to remove duplicate keys if you copied settings from above. Replace all the existing code in sendmail.ini with following code you have done!! create php file with mail function and send mail from localhost. Sendmail_from = "\"C:\xampp\sendmail\sendmail.exe\" -t" In C:\xampp\php\php.ini find extension=php_openssl.dll and remove the semicolon from the beginning of that line to make SSL working for gmail for localhost. ![]() So if you are using XAMPP then you can easily send mail from localhost.įor example you can configure C:\xampp\php\php.ini and c:\xampp\sendmail\sendmail.ini for gmail to send mail. You can send mail from localhost with sendmail package, sendmail package is inbuild in XAMPP.
0 Comments
Leave a Reply. |