Page 1 of 2

CONFIGURING APACHE TO SEND MAIL

PostPosted: 27. September 2008 12:10
by VEINTYUNICO
Hello! I just set the file "php.ini" from the folder "C:\XAMPP\APACHE\BIN" with the following configuration:

[mail function]
; For Win32 only.
SMTP = (my smtp server)
smtp_port = 25

; For Win32 only.
sendmail_from = (my email adress)

But, when a try to send an email from a page with "mail()", i dont get any error, so i figure that everything its ok. But i dont get any email!!! Help!?

PostPosted: 27. September 2008 12:11
by Wiedmann
Does your SMTP server work without authentification?

PostPosted: 27. September 2008 14:37
by VEINTYUNICO
YES IT NEED AN AUTHENTICATION. HOW I CONFIGURE IT?


THNKS MAN.

PostPosted: 28. September 2008 10:21
by Wiedmann
Configure PHP to use "sendmail" (in php.ini) and configure sendmail (in sendmail.ini)

OK!

PostPosted: 28. September 2008 16:28
by VEINTYUNICO
It works, but now when i run the web page, i get this message

Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Hello [190.16.14.22], Policy rejection on the target address: <elunico_jose@hotmail.com>

The email adress it's Ok, the smtp direction and the authetincation also.
What can it be!?

PostPosted: 28. September 2008 16:34
by Wiedmann
Warning: mail() [function.mail]: SMTP server response:

PHP is not using sendmail.

the smtp direction and the authetincation also.

:?:

PostPosted: 28. September 2008 16:46
by VEINTYUNICO
Oh man, you probably hate me at this point. Now i get this error:

Failed to connect to mailserver at "smtp.mail.yahoo.com.ar" port 465, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set().

PostPosted: 28. September 2008 16:51
by Wiedmann
Failed to connect to mailserver at "smtp.mail.yahoo.com.ar" port 465,

That's the same: PHP is not using sendmail.

Maybe you should explain, what you have changed in "php.ini" and "sendmail.ini".

What I change in php.ini and sendmail.ini

PostPosted: 29. September 2008 00:46
by VEINTYUNICO
I CHANGE THIS LINE IN PHP.INI
[mail function]
; For Win32 only.
SMTP=smtp.mail.yahoo.com.ar
smtp_port=465

; For Win32 only.
sendmail_from = jicarpanzano@yahoo.com.ar

AND THIS LINE IN SENDMAIL.INI

smtp_server=smtp.mail.yahoo.com.ar

; smtp port (normally 25)

smtp_port=465

----- -----

; if your smtp server requires authentication, modify the following two lines

auth_username="my username"
auth_password="my password"

do i have to copy sendmail.exe and sendmail.ini to another directory!?

PostPosted: 29. September 2008 06:43
by Wiedmann
I CHANGE THIS LINE IN PHP.INI

You have to change this line:
Code: Select all
;sendmail_path = "C:\xampp\sendmail\sendmail.exe -t"

to:
Code: Select all
sendmail_path = "C:\xampp\sendmail\sendmail.exe -t"


AND THIS LINE IN SENDMAIL.INI

Most times it's a good idea to use this line too:
Code: Select all
force_sender=jicarpanzano@yahoo.com.ar

OK!

PostPosted: 29. September 2008 10:21
by VEINTYUNICO
Ok I changed it and i dont get any error. Seems to be working
But, also aint receiving any mail.

Thank you

PostPosted: 29. September 2008 10:47
by Wiedmann
i dont get any error. Seems to be working
But, also aint receiving any mail.

In "sendmail.ini" you can also enable a debug and error log.

OK!

PostPosted: 29. September 2008 17:02
by VEINTYUNICO
This is what I get in "sendmail/error.log"

08/09/29 12:59:49 : Socket Error # 10054<EOL>Connection reset by peer.

PostPosted: 29. September 2008 17:13
by Wiedmann
This is what I get in "sendmail/error.log"

That's the complete error/debug.log?

Code: Select all
smtp_port=465

You are sure with this port?

PostPosted: 29. September 2008 17:36
by VEINTYUNICO
That's the port that yahoo give me.
Maybe If i try with 25...

Thanks man.