php - WAMP setup to send mails locally -
i want script able send emails wamp mail services such yahoo,gmail etc.i heard gmail has smtp that, dont know how setup wamp that.below files html sample code file: http://pastebin.com/e50wt0u0 sendmail.php: http://pastebin.com/8itga04y
you can send mail localhost sendmail package , sendmail package provided xampp default. if using xampp can send mail localhost.
for example can configure c:\xampp\php\php.ini , c:\xampp\sendmail\sendmail.ini
gmail send mail.
in c:\xampp\php\php.ini find extension=php_openssl.dll
, remove semicolon beginning of line make ssl working gmail localhost.
in php.ini file find [mail function] , change
smtp=smtp.gmail.com smtp_port=587 sendmail_from = my-gmail-id@gmail.com sendmail_path = "\"c:\xampp\sendmail\sendmail.exe\" -t"
now open c:\xampp\sendmail\sendmail.ini.
replace existing code in sendmail.ini following 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
now done!! create php file mail function , send mail localhost.
ps: don't forgot replace my-gmail-id , my-gmail-password in above code id , password. also, don't forget remove duplicate keys if copied settings above. example comment following line if there sendmail_path : sendmail_path="c:\xampp\mailtodisk\mailtodisk.exe"
in php.ini file
Comments
Post a Comment