smtp mail() problem to send from php

Problems with the Windows version of XAMPP, questions, comments, and anything related.

smtp mail() problem to send from php

Postby shaihulud1979 » 22. May 2014 11:15

Hello, I use Xampp 1.6.6.a, I coded a script for my business to list parts and by one clic to send the list to a registered mail by the mail() function. My problem is that after clic I've got the message

Warning: mail() [function.mail]: SMTP server response: 550 5.1.0 Authentification requise. Authentication Required. OFR102_402 [402] in C:\xampp\htdocs\garage\retours_pieces\retours.php on line 183
Le message n'a pu être envoyéFrom: "ME" Reply-To: them username: ME Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: 8bit


( I've removed personal data and replaced them here by ME and them, but the message displays the right datas )

As I found on the web, OFR102 is my web provider called in France " Orange " but I put in php.ini the smtp from my webhoster OVH.

these are my following settings, confidential settings as the true user and password are replaced bye DELETED, the parameters that are not completed are so in the file.

sendmail.ini
;smtp_server=ns0.ovh.net
;smtp_port=5025
;smtp_user = DELETED
;smtp_password = DELETED
;auth_username=DELETED
;auth_password=DELETED
;pop3_server=
;pop3_username=
;pop3_password=
;force_sender=me@localhost
;hostname=localhost


php.ini
[mail function]
; For Win32 only.
;SMTP = ns0.ovh.net
;smtp_port = 5025
;smtp_user = DELETED
;smtp_password = DELETED
; For Win32 only.
;sendmail_from = DELETED

; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path = "C:\xampp\sendmail\sendmail.exe -t"

; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =


PHP5.INI

[mail function]
; For Win32 only.
;SMTP = ns0.ovh.net
;smtp_port = 5025
;smtp_user = DELETED
;smtp_password = DELETED

; For Win32 only.
sendmail_from = DELETED

; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path = "G:\xampp\sendmail\sendmail.exe -t"

; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =


so the question is : what could be wrong ? why does xampp try to send by Orange while I told him to use OVH ? Thanks a lot to guys and girls ( are there some ? ) that will try to help me
shaihulud1979
 
Posts: 8
Joined: 16. January 2010 11:01
Operating System: Windows 7

Re: smtp mail() problem to send from php

Postby Nobbie » 22. May 2014 12:26

shaihulud1979 wrote:so the question is : what could be wrong ?


Everything is wrong. As you can see, ALL the options and parameters are preceeded by a leading semicolon ";" - and that means, they are commented out and NOT USED.

shaihulud1979 wrote:why does xampp try to send by Orange while I told him to use OVH ?


That fits to the first problem - I am pretty sure, that are looking into the completely wrong configuration files. The configuration of your email takes place somewhere else - but definately NOT with the shown *.ini files. "You are barking up the wrong tree".
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: smtp mail() problem to send from php

Postby shaihulud1979 » 22. May 2014 21:45

Thanks a lot for your answer, I'm a beginner and may sure make other mistakes. Is there something I should put on these lines when I remove the semicolons ?
shaihulud1979
 
Posts: 8
Joined: 16. January 2010 11:01
Operating System: Windows 7

Re: smtp mail() problem to send from php

Postby shaihulud1979 » 23. May 2014 06:58

I've removed the semicolons in sendmail.ini, seems to work. Wait and see but thanks a lot !! :D :D
shaihulud1979
 
Posts: 8
Joined: 16. January 2010 11:01
Operating System: Windows 7

Re: smtp mail() problem to send from php

Postby shaihulud1979 » 26. May 2014 09:53

It's crazy, the system works once when I restart the computer and then it fails again with the same message. Somebody an idea ? How does the mail() function work exactly, where does it takes its parameters ? please help I'm getting nuts.
shaihulud1979
 
Posts: 8
Joined: 16. January 2010 11:01
Operating System: Windows 7

Re: smtp mail() problem to send from php

Postby shaihulud1979 » 31. May 2014 14:32

Nobody to help me ?
shaihulud1979
 
Posts: 8
Joined: 16. January 2010 11:01
Operating System: Windows 7

Re: smtp mail() problem to send from php

Postby shaihulud1979 » 03. July 2014 15:38

Hello, I finally found a solution, in my code I tried to force the smtp server and I used smtp_server( my provider ) instead of... smtp( my provider ). Now everything works fine.
shaihulud1979
 
Posts: 8
Joined: 16. January 2010 11:01
Operating System: Windows 7


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 85 guests