Sunday 15 September 2013

email - PHP Mail() error using fakemail and WAMP -



email - PHP Mail() error using fakemail and WAMP -

im trying send email using localhost in wamp server , using fakemail tutorial. https://www.youtube.com/watch?v=qxvgknwxh5a got error.

here error, warning: mail(): failed connect mailserver @ "" port 25, verify "smtp" , "smtp_port" setting in php.ini or utilize ini_set()

how prepare it? im having hard time sending mails using wamp , because have no thought how.

here mail service function in php.ini

[mail function] ; win32 only. ; http://php.net/smtp smtp = smtp.gmail.com ; http://php.net/smtp-port smtp_port = 465 ; win32 only. ; http://php.net/sendmail-from sendmail_from = you@yourdomain ; unix only. may supply arguments (default: "sendmail -t -i"). ; http://php.net/sendmail-path ;sendmail_path ="c:\wamp\sendmail\sendmail.exe -t -1" ; forcefulness add-on of specified parameters passed parameters ; sendmail binary. these parameters replace value of ; 5th parameter mail(), in safe mode. ;mail.force_extra_parameters = ; add together x-php-originating-script: include uid of script followed filename mail.add_x_header = on ; log mail() calls including total path of script, line #, address , headers ;mail.log =

and here sendmail.ini

; configuration false sendmail ; if file doesn't exist, sendmail.exe settings in ; registry, under hklm\software\sendmail [sendmail] ; must alter mail.mydomain.com smtp server, ; or iis's "pickup" directory. (generally c:\inetpub\mailroot\pickup) ; emails delivered via iis's pickup directory cause sendmail ; run quicker, won't error messages calling ; application. smtp_server=smtp.gmail.com ; smtp port (normally 25) smtp_port=465 ; smtps (ssl) back upwards ; auto = utilize ssl port 465, otherwise seek utilize tls ; ssl = alway utilize ssl ; tls = utilize tls ; none = never seek utilize ssl smtp_ssl=auto ; default domain server read registry ; appended email addresses when 1 isn't provided ; if want override value in registry, uncomment , modify ;default_domain=mydomain.com ; log smtp errors error.log (defaults same directory sendmail.exe) ; uncomment enable logging error_logfile=error.log ; create debug log debug.log (defaults same directory sendmail.exe) ; uncomment enable debugging ;debug_logfile=debug.log ; if smtp server requires authentication, modify next 2 lines auth_username=xxxxxxxx@gmail.com auth_password=xxxxxxxx ; if smtp server uses pop3 before smtp authentication, modify ; next 3 lines. not enable unless required. pop3_server= pop3_username= pop3_password= ; forcefulness sender next email address ; impact "mail from" command, won't modify ; "from: " header of message content force_sender= ; forcefulness sender next email address ; impact "rctp to" command, won't modify ; "to: " header of message content force_recipient= ; sendmail utilize hostname , default_domain in ehlo/helo ; smtp greeting. can manually set ehlo/helo name if required hostname=localhost

i followed procedure in video still error.

and here sendmail.php

<?php $to = 'xxxxxxxx@live.com'; $subject = 'testing sendmail.exe'; $message = 'hahahahahahahhahaxxxxxx'; $headers = 'from hahaha'; if(mail($to,$subject,$message,$headers)){ echo "email sent"; } else{ echo "email sending failed"; } ?>

please help me email function on php. im having hard time making work, using wamp , can't host site yet, need send mails localhost.

examining error:

warning: mail(): failed connect mailserver @ "" port 25, verify "smtp" , "smtp_port" setting in php.ini or utilize ini_set()

it seems didn't restart wampp (apache) after you've changed php.ini file.

php email sendmail

No comments:

Post a Comment