PDA

View Full Version : Problems with Pear



L.I.C.C.
19-Nov-2005, 10:25 AM
The following error occurred in FormMail :
mail_failed
**********
Error=Failed to send email

More information:
PEAR Mail error: unable to add recipient [orders@############.co.uk]: Invalid response code received from server

I have this e-mail address and password entered in the pear section, what have I done wrong please.

Thanks,

Dave

p.s. it works if I test it with the hosting password and username using http://yoursite.com/formmail.php?testalert=1 but again it doesn't work with my form
My form works using the normal method but I want to use pear as this is a resold account on my hosting and I don't want my client to know where his site is really :-) and the header that the form sends gives it away !

russellr
19-Nov-2005, 09:12 PM
Hi,



I have this e-mail address and password entered in the pear section

p.s. it works if I test it with the hosting password and username

You need the hosting user/pass in the PEAR configuration in FormMail because it is for authentication.

Your form should work if you do this.

L.I.C.C.
19-Nov-2005, 10:24 PM
OK changes made now I get this error

The following error occurred in FormMail :
mail_failed
**********
Error=Failed to send email

More information:
PEAR Mail error: unable to add recipient [orders@###########.co.uk]: Invalid response code received from server

I am using the mangel feature if that makes a difference

Cheers,

Dave

russellr
19-Nov-2005, 11:59 PM
Hi,

Don't use the mangle feature in your PEAR settings in FormMail. AT_MANGLE is only to be used inside an HTML form.

Very simply: if you had the testalert working with a setting, then the form should too with the same setting.

L.I.C.C.
20-Nov-2005, 01:04 AM
OK I have removed the mangle feature from both my form and formmail now but I still get the same error message as above

Thanks,

Dave

russellr
20-Nov-2005, 11:15 AM
Hi,

Earlier you said you had a configuration that allowed the testalert to work.

Have you got that config now?

L.I.C.C.
20-Nov-2005, 02:36 PM
Yes if you visit https://secure.westwalesrallyspares.co.uk/mymailprog.php?testalert=1 you will see that it works but then if you fill in the sample form at https://secure.westwalesrallyspares.co.uk/sampleformhtml.php
you will see that the form fails and I get the following e-mail:
To: dave.buchholz@dsl.pipex.com
From: orders@westwalesrallyspares.co.uk

The following error occurred in FormMail :
mail_failed
**********
Error=Failed to send email

More information:
PEAR Mail error: unable to add recipient [orders@westwalesrallyspares.co.uk]: Invalid response code received from server

contact: 'Y'
colors: 'blue'
vehicles: 'Plane'
mesg: 'testing'
Thanks,

dave

russellr
20-Nov-2005, 09:10 PM
Hi,

Which address do you have DEF_ALERT set to?

If you change the sample form recipients to that address, does it work?

L.I.C.C.
20-Nov-2005, 09:22 PM
Hi again

I had it set to my personal e-mail dave.buchholz etc... I have re-set it to the same address as the form is submitted to but I still get the cannot add recipient error

thanks

Dave

russellr
20-Nov-2005, 09:28 PM
Hi,

No, we're going around in circles....

You had the testalert working. What I want you to do is:

Set DEF_ALERT to that address (the one that worked).
Set the PEAR configuration to the whatever it was when the testalert worked.
Confirm that testalert still works.
Set the form recipients to the same value as DEF_ALERT
Test the form.
Does that work now?

L.I.C.C.
21-Nov-2005, 12:37 AM
Hi,

With the e-mail address set to orders@westwalesrallyspares.co.uk in all instances Test Alert works and sends me this e-mail:

To: orders@westwalesrallyspares.co.uk
From: orders@westwalesrallyspares.co.uk

This is a test alert message
Loaded language is English (builtin)
PHP version is 4.4.0
FormMail version is 7.04
Server type: non-Windows

DOCUMENT_ROOT: /#####/####/public_html/secure
SCRIPT_FILENAME: /#####/####/public_html/secure/mymailprog.php
PATH_TRANSLATED: /#####/####/public_html/secure/mymailprog.php
REAL_DOCUMENT_ROOT: /#####/####/public_html


My form page gives me this error mesage:
An error occurred while processing the form .

Our staff have been alerted to the error .
We apologize for any inconvenience this error may have caused.

and the e-mail I recieve is as follows
To: orders@westwalesrallyspares.co.uk
From: orders@westwalesrallyspares.co.uk

The following error occurred in FormMail :
mail_failed
**********
Error=Failed to send email

More information:
PEAR Mail error: unable to add recipient [orders@westwalesrallyspares.co.uk]: Invalid response code received from server

contact: 'Y'
colors: 'blue'
vehicles: 'Plane'
mesg: 'ncnmeekceuifbcveoiv jdowofoeifvo'

hope that helps

Dave

just another point the form is located in a sub domain https://secure.westwalesrallyspares.co.uk if that makes adifference

russellr
21-Nov-2005, 07:42 AM
Hi,

Thanks for clarifying the exact situation.

It is strange, because of the inconsistency.



just another point the form is located in a sub domain https://secure.westwalesrallyspares.co.uk (https://secure.westwalesrallyspares.co.uk/) if that makes adifference

It may be something to do with this.

I suspect it is a security issue of some sort on the server.

But, there's no obvious difference between the testalert and your form submission that would indicate the cause of the problem.

I found a PHP/PEAR bug report here: http://pear.php.net/bugs/bug.php?id=4241

It seems to indicate that the bug is that the exact status (cause of the error) isn't shown. A bug in reporting not a bug in execution.

In other words, if you had the updated PHP/PEAR you'd be able to see the reason the server is reporting this error.

Since this bug report is Aug 2005, it's possible that you can update to a later version of PEAR and be able to see the exact message.

To upgrade PEAR: http://pear.php.net/group/docs/20051104-sa.php

It looks like you need the MAIL package version 1.1.7 or later: http://pear.php.net/package/Mail/download/1.1.7

Once you know the underlying error message, you'll be able to figure out what the server is complaining about and take steps to handle it.

As I said above, I suspect it's a security issue.

L.I.C.C.
22-Nov-2005, 12:00 AM
Thanks I will take it up with my hosting company

Dave

L.I.C.C.
23-Nov-2005, 12:02 AM
OK my host has upgraded the pear mail component to 1.1.9 but I still have exactly the same problem

Thanks

Dave

russellr
23-Nov-2005, 02:43 AM
Hi,

Good.

The error message was:


PEAR Mail error: unable to add recipient [orders@westwalesrallyspares.co.uk]: Invalid response code received from server

Is there now more information?

L.I.C.C.
23-Nov-2005, 09:02 AM
No the e-mail I recieved with the error message is exactly the same as before

To: orders@westwalesrallyspares.co.uk
From: orders@westwalesrallyspares.co.uk

The following error occurred in FormMail :
mail_failed
**********
Error=Failed to send email

More information:
PEAR Mail error: unable to add recipient [orders@westwalesrallyspares.co.uk]: Invalid response code received from server

contact: 'Y'
colors: 'blue'
vehicles: 'Truck'
mesg: 'mozilla test'

Thanks

Dave

russellr
23-Nov-2005, 09:24 PM
Hi,

OK, then I'm not sure that they've upgraded PEAR properly.

It's pretty clear from the pages I mentioned previously that the new version of the Mail.php PEAR module is designed to provide more information in the error. And you're not seeing that.

Basically, without determining exactly what the server is complaining about, we have no way of moving forward.

Either PEAR tells us, or we design specific tests to run on your server to determine what's going on in the mail subsystem.

L.I.C.C.
23-Nov-2005, 09:44 PM
They have only upgraded the mail component as far as I am aware is there any other packages that should be upgraded ?

I have also asked them to confirm that the upgrade was successful

Thanks for your patience

Dave

L.I.C.C.
23-Nov-2005, 09:51 PM
I just recieved this reply from my hosts help desk

====== Please reply above this line ======
help required with 3rd party application

Dave,

Here is the info displayed from pear. As you will see, Mail 1.1.9 is installed.

root@sigma [~]# pear info Mail
About Mail-1.1.9
================
Provides Classes:
Package Mail
Summary Class that provides multiple interfaces for
sending emails
Description PEAR's Mail package defines an interface for
implementing mailers under the PEAR hierarchy.
It also provides supporting functions useful to
multiple mailer backends. Currently supported
backends include: PHP's native mail() function,
sendmail, and SMTP. This package also provides a
RFC822 email address list validation utility
class.
Maintainers Chuck Hagenbuch <chuck@horde.org> (lead)
Richard Heyes <richard@phpguru.org> (developer)
Jon Parise <jon@php.net> (lead)
Version 1.1.9
Release Date 2005-09-13
Release License PHP/BSD
Release State stable
Release Notes - SMTP connections are now reset (RSET) when an
error occurs. (Bug 5212)
- The SMTP driver now exposes a disconnect()
method which forcibly destroys the SMTP
connection. (Bug 5372)
Release Deps Package Net_SMTP >= 1.1.0
Last Modified 2005-11-22

Regards,
Josh

Does that help ?

Thanks,

Dave

russellr
23-Nov-2005, 10:00 PM
Hi,

It looks right.

I noticed this:


Release Deps Package Net_SMTP >= 1.1.0

Are you able to telnet or SSH to your server and type:


pear info Net_SMTP


If not, ask them to do it.

russellr
23-Nov-2005, 10:04 PM
Hi,

Actually, don't worry too much. That required version of Net_SMTP is very old, so you'll have a later version on your server.

Unfortunately, it seems that the correct version of the Mail module is not reporting the error details as it claimed it would.

I can't think of any way forward without designing specific tests for your server.

L.I.C.C.
23-Nov-2005, 11:59 PM
Thanks for your help I have gone back to my host again to see if they can help futher

Dave