testing forms; sending email

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

testing forms; sending email

Postby elvisparsley » 04. January 2008 11:26

How can I set up XAMPP for testing forms that send email results? I'd like to be able to check that all the form data is sent to the approriate email addresses (my eamails)
elvisparsley
 
Posts: 19
Joined: 24. December 2007 17:14

Postby KallistaAEnvarou » 04. January 2008 11:32

You would need to set it up as a live server since I don't think the mail() function works on non-live localhost servers.

See this thread for more information and ask any questions you might still have.
Last edited by KallistaAEnvarou on 04. January 2008 11:54, edited 2 times in total.
KallistaAEnvarou
 
Posts: 126
Joined: 02. December 2007 17:33
Location: Cold Cold California

Re: testing forms; sending email

Postby Izzy » 04. January 2008 11:51

elvisparsley wrote:How can I set up XAMPP for testing forms that send email results? I'd like to be able to check that all the form data is sent to the approriate email addresses (my eamails)

I take it the 'my emails' means your email addresses at your ISP and/or some other email service.

This should allow you to send email from your form through your ISP's mail service which is usually the best method in these days of massive spammer issues with ISP's blocking most from sending email via the usual port 25 - which they block unless you use their service - and mail recipient services using Blocking Lists to block individual IP addresses:

Open xampp\apache\bin\php.ini in your text editor and find this section and edit it so it looks like this:

;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;

[mail function]
; For Win32 only.
SMTP = smtp.atmyisp.com
smtp_port = 25

; For Win32 only.
sendmail_from = me@atmyisp.com

Use the same smtp server you use with your regular email client - normally the one your ISP provides as they usually allow email to go out through the normal port 25.

Save the file and restart Apache to have the edits recognized - make a backup of ini and conf files before editing.
Last edited by Izzy on 09. January 2008 22:48, edited 1 time in total.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby shrg18 » 09. January 2008 05:07

I have the same problem.

I have done the following:

1) in xampp\php\php.ini
ln 528 from = abc@xyx.com (uncommented and added an email address)

ln 617 extesnion = php_mailparse.dll (uncommented)
ln 659 extension=php_smtp.dll (uncommented)
ln 706 sendmail_from = me@example.com (uncommented)
ln 700-703

[mail function]
; For Win32 only.
SMTP = smtp.myisp.com
smtp_port = 25

2) in xampp\apache\bin\php.ini
ln 88-90

[mail function]
; For Win32 only.
SMTP = smtp.myisp.com
smtp_port = 25

---------------------------------------------------------------------------
after restart, still have the error message:
Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in

this message is the same as what I got before modifying the configuartions in php.ini

where do I miss?
shrg18
 
Posts: 43
Joined: 16. August 2007 13:59
Location: windsor, on, canada
Operating System: windows 8

Postby Izzy » 09. January 2008 05:45

[mail function]
; For Win32 only.
SMTP = smtp.myisp.com
smtp_port = 25


; For Win32 only.
sendmail_from = me@myisp.com

I would have thought that uncommenting the sendmail_from item would have been fairly obvious.

BTW you only need to change values or uncomment items in xampp\apache\bin\php.ini - all other php.ini files are irrelevant and will be ignored.

The path to the ini used can be found in here
http://localhost/xampp/phpinfo.php
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby shrg18 » 09. January 2008 06:33

Izzy wrote:[mail function]
; For Win32 only.
SMTP = smtp.myisp.com
smtp_port = 25


; For Win32 only.
sendmail_from = me@myisp.com

I would have thought that uncommenting the sendmail_from item would have been fairly obvious.

BTW you only need to change values or uncomment items in xampp\apache\bin\php.ini - all other php.ini files are irrelevant and will be ignored.

The path to the ini used can be found in here
http://localhost/xampp/phpinfo.php

Thanks for quick response.

I commented back those lines in xampp\php\php.ini

and copy/paste those lines to xampp\apache\php\php.ini (they are missed in this php.ini)

the new error messages:
Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in (... my testing file)

smtp.myisp.com wouldn't work either.

what should I do?
shrg18
 
Posts: 43
Joined: 16. August 2007 13:59
Location: windsor, on, canada
Operating System: windows 8

Postby Izzy » 09. January 2008 06:51

and copy/paste those lines to xampp\apache\php\php.ini (they are missed in this php.ini)

Not possible unless you deleted those lines in the first place - look a bit closer for the original lines and delete your copy and paste.

In my xampp\apache\bin\php.ini file those lines are near line number 693 in this settings block just under the list of extensions:
Code: Select all
;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;


Also this smtp.myisp.com = enter here your own ISPs SMTP mail address the one you use when sending mail from your email client like Outlook Express.

me@myisp.com = your email address that you have with your ISP and use in your email client like OE.

If you put those things in correctly then it should work for you as I can replicate this and it works perfectly on my system.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby shrg18 » 09. January 2008 07:47

Izzy wrote:In my xampp\apache\bin\php.ini file those lines are near line number 693 in this settings block just under the list of extensions:
[code];;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;


I don't know where it went wrong,but there are only 249 lines in xampp\apache\bin\php.ini.

It may be better to download the new version and install xampp from new.
shrg18
 
Posts: 43
Joined: 16. August 2007 13:59
Location: windsor, on, canada
Operating System: windows 8

Postby Izzy » 09. January 2008 08:14

It may be better to download the new version and install xampp from new.

That would more than likely be best under the circumstances, and the lesson to be learned here, and one I have posted countless times, is to always make a backup of ini and conf files, so at the very least, you always have the originals to fall back on in times like these.

Make a backup of any personal data before installing the new version.

I do that by simply holding down the CTRL key and dragging the current xampp directory so it creates a Copy of xampp - you then have a copy of all the data and files from your old installation.

When you are happy that your new installation is as you like it, then you can delete the Copy of XAMPP.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby shrg18 » 10. January 2008 14:16

If I should start a new thread on this subject, please inform me.
---------------------------------------------------------------------------

1.xampp 1.6.5
there is a problem at installing xampp 1.6.5 windows version.
after the installation, the first time it starts OK, but later, everytime start it, there is an error prompt message pops up:

"This application has failed to start because php_mbstring.dll was not found. Reinstalling the application may fix this problem"

when open php console in command window, the error message pops up too.

Reinstalling could not make it disappear. But apache and mysql are activated well (seems to me)

I checked the directories, php_mbstrnig.dll is in xampp\php\ext and xampp\php\extensions.

2. the missing part in php.ini
xampp\apache\bin\php.ini might be shortened from using AMPStart. I am not sure. It seems to optimize starting by deleting non-used script lines in php.ini.

3. when check in the command window :
C:\xampp\php>php -m
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_
mailparse.dll' - The specified module could not be found.
in Unknown on line 0

but I guess missing mailparse.dll may not be a problem

4. despite all these uncertainties, I used syntax:

SMTP = smtp.myisp.com (later SMTP = mysip.com, indicated by my isp service)

the error message is:
Warning: mail() [function.mail]: Failed to connect to mailserver at "myisp.com" port 25, verify your "SMTP" and "smtp_port" setting in php.ini

though it didn't go through, it sounds promising to me.

what should I do next ?
shrg18
 
Posts: 43
Joined: 16. August 2007 13:59
Location: windsor, on, canada
Operating System: windows 8


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 28 guests