Xampp PHP page forms workin only for some adresses

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

Xampp PHP page forms workin only for some adresses

Postby skachy » 16. March 2011 20:53

Hello

I am running Xampp 1.7.3 under Windows 2008 R2 Web Server 64bit version. On our sites I have some PHP page forms, which send submitted information through smtp server with no authentification (I have tried different ones too) set in php.ini file. Problem is, that these page forms send submitted text only to some addresses, mostly the info@domain.xx is working. When there is any other mail set, the error is generated :

Warning: mail() [function.mail]: SMTP server response: 554 <vejnar@staramyslivna.cz>: Recipient address rejected: Access denied in D:\localhost\restauracekonopiste.cz\pages\rezervace-online.php on line 36

Message was not sent.


When I try to send email to that address with same smtp server set with my email client, everything is working fine, so I suppose, there is no problem with smtp server nor client email address.

Could anyone help me solving this issue please ?

thanks

Jakub
skachy
 
Posts: 7
Joined: 02. March 2011 10:19

Re: Xampp PHP page forms workin only for some adresses

Postby Sharley » 17. March 2011 01:06

You can do an advanced forum search for sendmail that may help with configuring mail sending or paste here your sendmail.ini file and the section in the php.ini file you currently have configured for email - without which would be impossible to help you.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Xampp PHP page forms workin only for some adresses

Postby skachy » 18. March 2011 12:58

OK. Sorry, I am quite new to Apache. I am also quite confused with sendmail. I thought, that configuring php.ini and php page form should be enough. What is the role of sendmail.exe in this please ?

sendmail.ini looks like this :

# Example for a user configuration file

# Set default values for all following accounts.
defaults
logfile "D:\xampp\xampp\sendmail\sendmail.log"

# Mercury
account Mercury
host localhost
from postmaster@localhost
auth off

# A freemail service example
account Hotmail
tls on
tls_certcheck off
host smtp.live.com
from [exampleuser]@hotmail.com
auth on
user [exampleuser]@hotmail.com
password [examplepassword]

# Set a default account
account default : Mercury



and php.ini is like this :

http://www.svetit.cz/xampp/php.txt


Again, thank you so much for the support !

Jakub
skachy
 
Posts: 7
Joined: 02. March 2011 10:19

Re: Xampp PHP page forms workin only for some adresses

Postby Sharley » 18. March 2011 13:16

In the php.ini file try this edit and see if it helps - don't forget to save the file and restart Apache after editing this file
Code: Select all
; For Win32 only.
; http://php.net/sendmail-from
;sendmail_from = postmaster@localhost
Change this by uncommenting and adding the email address of the sender, usually the email address that is used by your normal email client program
Code: Select all
; For Win32 only.
; http://php.net/sendmail-from
sendmail_from = youremailaddress@wifcom.cz

You would need to use sendmail if your smtp service above requires authentication.

Let me know back if the above email service requires authentication and would be indicated in your normal email client software settings - usually a user/pass combination.


You could also uncomment this line so you have a log file to read for clues if you get any errors - uncommented looks like this
Code: Select all
; Log all mail() calls including the full path of the script, line #, to address and headers
mail.log = "D:\xampp\xampp\apache\logs\php_mail.log"
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Xampp PHP page forms workin only for some adresses

Postby skachy » 18. March 2011 13:34

Thanks Sharley for the prompt answer. Just one thing. Smtp.wifcom.cz is smtp server from our ISP, that we know is working good and requires no authentication , therefore we have chosen to use this, but we do not have any email address on that. Hope it is ok if we just make up some. And we re going to enable that logs too right now. I will write you with the results of this.

thanks

Jakub
skachy
 
Posts: 7
Joined: 02. March 2011 10:19

Re: Xampp PHP page forms workin only for some adresses

Postby skachy » 24. March 2011 20:35

Hello

Sorry for the delay. I have changed the lines according to your post and it is still not working. But there is a different error now in log present :

Warning: mail() [function.mail]: SMTP server response: 550 relay not permitted in D:\localhost\restauracekonopiste.cz\pages\rezervace-online.php on line 36

Could you please tell me what it could be ?

thanks

Jakub
skachy
 
Posts: 7
Joined: 02. March 2011 10:19

Re: Xampp PHP page forms workin only for some adresses

Postby Sharley » 26. March 2011 02:08

Your made up email address is not being recognised by your ISP and so it thinks you are a spammer and bounces the email.

If you don't have an email account with your ISP then do not send form response email via this ISP as it will continue to happen - your ISP does a reverse look up of your IP and if it recognizes it as one of there own IPs then it may allow email through but from a form it can only see the local loop IP 127.0.0.1 and will bounce email from that IP.

Read these Search Results that may explain again why you should perhaps be using the highly configurable sendmail included in XAMPP - see my post above about how to find the many posts that will help you configure sendmail in XAMPP 1.7.3.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Xampp PHP page forms workin only for some adresses

Postby skachy » 28. March 2011 13:23

Thanks again for your reply. We will certainly have a look at the sendmail.ini and try to configure it right way to set the smtp server. Just one thing I find quite odd. If the ISP gives this smtp server for public use, requires no authentication and advises all customers to use it instead of that they had used before, why would they block our emails ? And if, why only some of them ?

thank you for your reply

Jakub
skachy
 
Posts: 7
Joined: 02. March 2011 10:19

Re: Xampp PHP page forms workin only for some adresses

Postby Sharley » 29. March 2011 01:33

Sharley wrote:your ISP does a reverse look up of your IP and if it recognizes it as one of there own IPs then it may allow email through but from a form it can only see the local loop IP 127.0.0.1 (or your LAN IP) and will bounce email from those IP (addresses because spammers use them also to send email messages).
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Xampp PHP page forms workin only for some adresses

Postby skachy » 29. March 2011 14:05

oh yeah, I am sorry, bad reading

thank you Mr. Sharley
skachy
 
Posts: 7
Joined: 02. March 2011 10:19


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 54 guests