php.ini & SMTP= - how do you pass username & password
Solution 1:
PHP mail()
command does not support authentication. Your options:
- PHPMailer- Tutorial
- PEAR - Tutorial
- Custom functions - See various solutions in the notes section: http://php.net/manual/en/ref.mail.php
Solution 2:
I apply following details on php.ini file. its works fine.
SMTP = smtp.example.com
smtp_port = 25
username = [email protected]
password = yourmailpassord
sendmail_from = [email protected]
These details are same as on outlook settings.
Solution 3:
Use Fake sendmail for Windows to send mail.
- Create a folder named
sendmail
inC:\wamp\
. - Extract these 4 files in
sendmail
folder:sendmail.exe
,libeay32.dll
,ssleay32.dll
andsendmail.ini
. - Then configure
C:\wamp\sendmail\sendmail.ini
:
smtp_server=smtp.gmail.com smtp_port=465 [email protected] auth_password=your_password
-
The above will work against a Gmail account. And then configure php.ini:
sendmail_path = "C:\wamp\sendmail\sendmail.exe -t"
Now, restart Apache, and that is basically all you need to do.