email - XAMPP Sendmail using Gmail account -


i'm trying configure sendmail through xampp send email. in sendmail.ini have these settings:

# set default values following accounts.  logfile "c:\xampp\sendmail\sendmail.log account gmail tls on port 587 tls_certcheck off host smtp.gmail.com myemail@gmail.com auth on user myemail06@gmail.com password mypassword  account default : gmail 

i've created test script this:

$to = "testemail@btinternet.com"; $subject = "hi!"; $body = "hi,\n\nhow you?"; $headers = "from: myemail06@gmail.com" . "\r\n"; if (mail($to, $subject, $body, $headers)) {     echo ("message sent!"); } else {     echo ("message delivery failed..."); } 

i message email sent never arrives , in logs get:

sendmail: error during delivery: must issue starttls command first.

does know issue here?

thanks in advance!

gaz

this worked me no 1 else burn oil figure out did.

here sendmail.ini

[sendmail]  smtp_server=smtp.gmail.com smtp_port=25 error_logfile=error.log debug_logfile=debug.log auth_username=myemail@gmail.com auth_password=yourgmailpassword force_sender=myemail@gmail.com 

php/php.ini ----basically comment out except sendmail_path & mail.add_x_header

[mail function] ; win32 only. ; http://php.net/smtp ;smtp = localhost ; http://php.net/smtp-port ;smtp_port = 25  ; win32 only. ; http://php.net/sendmail-from ;sendmail_from = postmaster@localhost  ; unix only.  may supply arguments (default: "sendmail -t -i"). ; http://php.net/sendmail-path sendmail_path = "\"c:\xampp\sendmail\sendmail.exe\" -t"  ; force addition of specified parameters passed parameters ; sendmail binary. these parameters replace value of ; 5th parameter mail(), in safe mode. ;mail.force_extra_parameters =  ; add x-php-originating-script: include uid of script followed filename mail.add_x_header = off  ; log mail() calls including full path of script, line #, address , headers ;mail.log = "c:\xampp\apache\logs\php_mail.log" 

this worked me after updated sendmail files (the old ones dont support smtp)

  • go http://glob.com.au/sendmail/ , grab latest sendmail zip file
  • unzip desktop , copy files \xampp\sendmail folder replacing there.everything!
  • now open sendmail.ini , copy paste showed above.(remove in file first or comment out!)
  • note: dont need mercury servers started this.

i making password recovery php on localhost when encountered problem. needed send users password. - php looks okey


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -