Contact email always invalid

Need help with the Administration of your Joomla! site? Pop your questions in here.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
User avatar
alandd
Joomla! Intern
Joomla! Intern
Posts: 61
Joined: Thu Aug 18, 2005 6:09 am
Location: Gilbert, Arizona, USA

Contact email always invalid

Post by alandd » Sun Sep 03, 2006 5:58 am

I'm running a site recently updated to 1.0.11 through several hops from Mambo 4.x.  All has been going well.

Then, today, a user reported that they got some kind of error when trying to use the Contact Us form.  So tonight I tried it.  It is, in fact, now broken.

I can pick any contact and fill out the form to send an email.  When Send is clicked a box pops up stating "Please make sure the form is complete and valid."

Following this string into the code I come to this snippet in in /componets/com_contact/contact.html.php (* @version $Id: contact.html.php 4157 2006-07-02 17:58:51Z stingrey $):

Code: Select all

		<script language="JavaScript" type="text/javascript">
		<!--
		function validate(){
			if ( ( document.emailForm.text.value == "" ) || ( document.emailForm.email.value.search("@") == -1 ) || ( document.emailForm.email.value.search("[.*]" ) == -1 ) ) {
				alert( "<?php echo _CONTACT_FORM_NC; ?>" );
			} else if ( ( document.emailForm.email.value.search(";") != -1 ) || ( document.emailForm.email.value.search(",") != -1 ) || ( document.emailForm.email.value.search(" ") != -1 ) ) {
				alert( "<?php echo _CONTACT_ONE_EMAIL; ?>" );			
			} else {
				document.emailForm.action = "<?php echo sefRelToAbs("index.php?option=com_contact&Itemid=$Itemid"); ?>"
				document.emailForm.submit();
			}
		}
		//-->
		</script>
The "Please make sure.." string is _CONTACT_FORM_NC in the snippet above.  The code appearently is validating the input on the form and the validation is failing.

Why is it failing suddenly?  How do I track this down?

I thought that maybe I should update the entire site with the Joomla_1.0.10-Stable-Full_Package, overwritting any cruft from the version to version updates over the past couple of years.  I don't know how dangerous such a thing would be.

The contacts MUST work for this site.  It is a primary means of communication from visitors to the site.  All help is appreciated.
Last edited by Anonymous on Thu Sep 07, 2006 10:44 am, edited 1 time in total.

user deleted

Re: Contact email always invalid

Post by user deleted » Sun Sep 03, 2006 7:12 pm

Hi,

Thanks for the report, I've already seen a similar topic with the exact same problem. Will be looking into this.

Regards Robin

[TAGGED: Q&T] Note, related topic: http://forum.joomla.org/index.php/topic,91127.0.html
Added report to Q&T forum; http://forum.joomla.org/index.php/topic,91736.0.html
Last edited by user deleted on Sun Sep 03, 2006 7:16 pm, edited 1 time in total.

friesengeist
Joomla! Guru
Joomla! Guru
Posts: 842
Joined: Sat Sep 10, 2005 10:31 pm

Re: Contact email always invalid

Post by friesengeist » Sun Sep 03, 2006 7:39 pm

alandd wrote: The "Please make sure.." string is _CONTACT_FORM_NC in the snippet above.  The code appearently is validating the input on the form and the validation is failing.

Why is it failing suddenly?  How do I track this down?
It's probably not the JavaScript that generates the error, but new validation in com_contact.php. I guess the phpmailer function says it failed.

Would be interesting to know if you receive mails although the error message is displayed?

Could you please post (or PM me) a link to your site? Also post some server details for the mailing functions from your global config please. Thanks in advance.
We may not be able to control the wind, but we can always adjust our sails

user deleted

Re: Contact email always invalid

Post by user deleted » Sun Sep 03, 2006 7:42 pm

Hi Enno,

On the related topic (http://forum.joomla.org/index.php/topic,91127.0.html) you find a similar problem. This user provided his config/email settings.

Edit: I see you already found it  ;)

friesengeist
Joomla! Guru
Joomla! Guru
Posts: 842
Joined: Sat Sep 10, 2005 10:31 pm

Re: Contact email always invalid

Post by friesengeist » Sun Sep 03, 2006 7:45 pm

RobInk wrote: Edit: I see you already found it  ;)
Actually, I was made aware of it from your post in the 1.0 Q&T board, otherwise I wouldn't have noticed this thread here ;)
We may not be able to control the wind, but we can always adjust our sails

User avatar
alandd
Joomla! Intern
Joomla! Intern
Posts: 61
Joined: Thu Aug 18, 2005 6:09 am
Location: Gilbert, Arizona, USA

Re: Contact email always invalid

Post by alandd » Sun Sep 03, 2006 7:50 pm

friesengeist wrote: Would be interesting to know if you receive mails although the error message is displayed?
No emails come through.  The problem would not be as critical if the emails worked anyway.
friesengeist wrote: Could you please post (or PM me) a link to your site? Also post some server details for the mailing functions from your global config please. Thanks in advance.
The site in question is http://www.tigerpride.org.&nbsp; Let me go check the global config...

Code: Select all

$mosConfig_mailer = 'mail';
$mosConfig_mailfrom = '[email protected]';
...
$mosConfig_sef = '0';
$mosConfig_sendmail = '/usr/sbin/sendmail';
...
$mosConfig_smtpauth = '0';
$mosConfig_smtphost = 'localhost';
$mosConfig_smtppass = '';
$mosConfig_smtpuser = '';
If I missed something there, let me know.

BTW, as an experiment I installed another instance of Joomla! 1.0.11 one directory under this one with its own tables in the DB.  It's contact emailing works fine.  I think that rules out a server issue.  The server in question, for full documentation, is a Windows system, ISS with a MySQL back end DB.

friesengeist
Joomla! Guru
Joomla! Guru
Posts: 842
Joined: Sat Sep 10, 2005 10:31 pm

Re: Contact email always invalid

Post by friesengeist » Sun Sep 03, 2006 7:57 pm

Thanks!
alandd wrote: BTW, as an experiment I installed another instance of Joomla! 1.0.11 one directory under this one with its own tables in the DB.  It's contact emailing works fine.  I think that rules out a server issue.  The server in question, for full documentation, is a Windows system, ISS with a MySQL back end DB.
That's really interesting. Are the datails for the contact the same on both sites (especially the mail-address for the receiver)?
And have you entered the same data in the contact form?
We may not be able to control the wind, but we can always adjust our sails

User avatar
alandd
Joomla! Intern
Joomla! Intern
Posts: 61
Joined: Thu Aug 18, 2005 6:09 am
Location: Gilbert, Arizona, USA

Re: Contact email always invalid

Post by alandd » Sun Sep 03, 2006 8:19 pm

friesengeist wrote: Thanks!
alandd wrote: BTW, as an experiment I installed another instance of Joomla! 1.0.11 one directory under this one with its own tables in the DB.  It's contact emailing works fine.  I think that rules out a server issue.  The server in question, for full documentation, is a Windows system, ISS with a MySQL back end DB.
That's really interesting. Are the datails for the contact the same on both sites (especially the mail-address for the receiver)?
And have you entered the same data in the contact form?
I wasn't careful about making sure they were the exactly the same.  Let me go confirm that the contact is the same in both contact lists and then I'll try exactly the same information in both contact forms.

All the same.  The original site produces the "Please make sure..." pop-up with no email and the fresh install sends the email just fine.

This time I ran the form submission in Konqueror instead of Firefox.  Behavior is the same, as I just stated.  However, when I attempted to close Konqueror it warned me that the current tab had information that was not yet submitted.  Maybe that helps.
Last edited by alandd on Sun Sep 03, 2006 8:21 pm, edited 1 time in total.

friesengeist
Joomla! Guru
Joomla! Guru
Posts: 842
Joined: Sat Sep 10, 2005 10:31 pm

Re: Contact email always invalid

Post by friesengeist » Sun Sep 03, 2006 8:21 pm

alandd wrote: I wasn't careful about making sure they were the exactly the same.  Let me go confirm that the contact is the same in both contact lists and then I'll try exactly the same information in both contact forms.

All the same.  The original site produces the "Please make sure..." pop-up with no email and the fresh install sends the email just fine.
Just to make sure: are the settings for $mosConfig_mailer also the same for both sites?
alandd wrote: This time I ran the form submission in Konqueror instead of Firefox.  Behavior is the same, as I just stated.  However, when I attempted to close Konqueror it warned me that the current tab had information that was not yet submitted.  Maybe that helps.
Probably because the error message does a "window.history.go(-1);" after submitting, so Konqueror thinks that the form has not been sent.
Last edited by friesengeist on Sun Sep 03, 2006 8:24 pm, edited 1 time in total.
We may not be able to control the wind, but we can always adjust our sails

User avatar
alandd
Joomla! Intern
Joomla! Intern
Posts: 61
Joined: Thu Aug 18, 2005 6:09 am
Location: Gilbert, Arizona, USA

Re: Contact email always invalid

Post by alandd » Sun Sep 03, 2006 8:25 pm

friesengeist wrote:
Just to make sure: are the settings for $mosConfig_mailer also the same for both sites?
Yes.  They are both

Code: Select all

$mosConfig_mailer = 'mail';

friesengeist
Joomla! Guru
Joomla! Guru
Posts: 842
Joined: Sat Sep 10, 2005 10:31 pm

Re: Contact email always invalid

Post by friesengeist » Sun Sep 03, 2006 8:38 pm

Could you please override the following two files with the files in the attached zipfile? (I will delete the attachment once you downloaded it.) I have added some additional error messages to see where the error comes from.

Don't forget the backup first ;)

The files are:
/includes/joomla.php
/components/con_contact/contact.php

Let me know what the error message is (including the additional number behind it).

Thanks in advance!
Last edited by friesengeist on Sun Sep 03, 2006 8:46 pm, edited 1 time in total.
We may not be able to control the wind, but we can always adjust our sails

User avatar
alandd
Joomla! Intern
Joomla! Intern
Posts: 61
Joined: Thu Aug 18, 2005 6:09 am
Location: Gilbert, Arizona, USA

Re: Contact email always invalid

Post by alandd » Sun Sep 03, 2006 8:47 pm

friesengeist wrote: Let me know what the error message is (including the additional number behind it).
The pop box states:

Code: Select all

An error occured: mosMail 3

friesengeist
Joomla! Guru
Joomla! Guru
Posts: 842
Joined: Sat Sep 10, 2005 10:31 pm

Re: Contact email always invalid

Post by friesengeist » Sun Sep 03, 2006 8:53 pm

alandd wrote: The pop box states:

Code: Select all

An error occured: mosMail 3
The recipient which is linked to this contact seams to have an invalid email address. (At least the verification of the mailaddress fails). Could you try to edit the contact information (mainly recipients email address) for the contact, or even setup a new test contact?
Last edited by friesengeist on Sun Sep 03, 2006 8:56 pm, edited 1 time in total.
We may not be able to control the wind, but we can always adjust our sails

User avatar
alandd
Joomla! Intern
Joomla! Intern
Posts: 61
Joined: Thu Aug 18, 2005 6:09 am
Location: Gilbert, Arizona, USA

Re: Contact email always invalid

Post by alandd » Sun Sep 03, 2006 9:07 pm

friesengeist wrote: The recipient which is linked to this contact seams to have an invalid email address. (At least the verification of the mailaddress fails). Could you try to edit the contact information (mainly recipients email address) for the contact, or even setup a new test contact?
Bet you a donut that I know what the problem is!

The new test contact I created worked fine.  That got me thinking about the verification of the contact's email address failing.  Any I started thinking about what could be different between the new test contact that worked and all the other contacts fail.

All the contacts in this particular web site have multiple email addresses in their "Email:" field.  This is so that the contact person and a backup or two all get copies of the email.  The mulitple addresses must be causing the verification failure when previous versions of code allowed multiple emails.

How does the verification do with "Email:" field data like ?

(I just saw your test email come through.)

friesengeist
Joomla! Guru
Joomla! Guru
Posts: 842
Joined: Sat Sep 10, 2005 10:31 pm

Re: Contact email always invalid

Post by friesengeist » Sun Sep 03, 2006 9:16 pm

alandd wrote: Bet you a donut that I know what the problem is!

The new test contact I created worked fine.  That got me thinking about the verification of the contact's email address failing.  Any I started thinking about what could be different between the new test contact that worked and all the other contacts fail.

All the contacts in this particular web site have multiple email addresses in their "Email:" field.  This is so that the contact person and a backup or two all get copies of the email.  The mulitple addresses must be causing the verification failure when previous versions of code allowed multiple emails.

How does the verification do with "Email:" field data like ?
That's it, glad you found it. You are right, since 1.0.11, all email checks will only allow one single email address. That was changed for additional security, because otherwise attackers could inject email headers. This does indeed break mailing to multiple addresses. Sorry!

I hope it's an option for you to enter just a single email address for a contact?
We may not be able to control the wind, but we can always adjust our sails

User avatar
alandd
Joomla! Intern
Joomla! Intern
Posts: 61
Joined: Thu Aug 18, 2005 6:09 am
Location: Gilbert, Arizona, USA

Re: Contact email always invalid

Post by alandd » Sun Sep 03, 2006 9:21 pm

friesengeist wrote: That's it, glad you found it. You are right, since 1.0.11, all email checks will only allow one single email address. That was changed for additional security, because otherwise attackers could inject email headers. This does indeed break mailing to multiple addresses. Sorry!

I hope it's an option for you to enter just a single email address for a contact?
Well, it is a feature we had come to rely on.  We will have to work around its lack it somehow.  At least I now have an answer to the present issue!

Where do I make a "multiple emails in a contact" feature request?  ;)

Thanks for all the help!

PS Where's my donut?

Cothu
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Thu Jul 27, 2006 6:46 pm

Re: Contact email always invalid

Post by Cothu » Tue Sep 05, 2006 9:11 pm

I'm getting the same "Please make sure the form is complete and valid." message when someone is using the Contact form on my site. 

I have only one contact, with only one e-mail address.

Edited 2 minutes later...

Realized that the mail setting in my globals was on "PHP Mail Function" not "Sendmail".  Changed it to sendmail, and it works fine now.

Doh!
Last edited by Cothu on Tue Sep 05, 2006 9:15 pm, edited 1 time in total.

user deleted

Re: Contact email always invalid

Post by user deleted » Thu Sep 07, 2006 10:44 am

Hi Alan,
Where do I make a "multiple emails in a contact" feature request?
In the feature/wishlist forum  ;)

User avatar
boylan
Joomla! Apprentice
Joomla! Apprentice
Posts: 35
Joined: Fri Aug 19, 2005 10:55 am
Location: Gillette, NJ
Contact:

Re: Contact email always invalid

Post by boylan » Thu Sep 07, 2006 5:28 pm

I am getting the same error.  I get the JS popup no matter what I put in the contact fields.

I have only one email address for the contact.  I have tried both SMTP and PHP mail, but there is no mailserver on the server - I had been using SMTP before to success. 

I am running Joomla 1.0.11 on Windows 2003 and IIS.

I don't receive the mails either.  Is it indicating an error in delivering the mail?  or is the error before it even gets processed?

I'm trying to troubleshoot, but I can't find a way to tell if its the form itself, or the delivery that's the problem.  Is there a way to check if the SMTP settings in configuration.php are correct?

User avatar
boylan
Joomla! Apprentice
Joomla! Apprentice
Posts: 35
Joined: Fri Aug 19, 2005 10:55 am
Location: Gillette, NJ
Contact:

Re: Contact email always invalid

Post by boylan » Thu Sep 07, 2006 8:03 pm

Okay - a little more clarity now.  - It appears that what I put in the email address field while testing affects whether or not I see the error message.

If I enter an email address I know to exist - the email goes through.  If I guess an email address that doesn't exist at a domain I know exists, it doesn't go through.  Is Joomla verifying that the email address exists before sending me the email?  Or am I seeing a pattern that isn't there?

If it is checking that the email address exists, can I turn that off?

Thanks.

User avatar
boylan
Joomla! Apprentice
Joomla! Apprentice
Posts: 35
Joined: Fri Aug 19, 2005 10:55 am
Location: Gillette, NJ
Contact:

Re: Contact email always invalid

Post by boylan » Thu Sep 07, 2006 8:05 pm

Sorry -- you can try it out yourself to verify at http://welcome.preppermint.net/index.ph ... t&Itemid=3.
Last edited by boylan on Sat Oct 14, 2006 7:58 pm, edited 1 time in total.

friesengeist
Joomla! Guru
Joomla! Guru
Posts: 842
Joined: Sat Sep 10, 2005 10:31 pm

Re: Contact email always invalid

Post by friesengeist » Fri Sep 08, 2006 2:23 pm

boylan wrote: If I enter an email address I know to exist - the email goes through.  If I guess an email address that doesn't exist at a domain I know exists, it doesn't go through.  Is Joomla verifying that the email address exists before sending me the email?  Or am I seeing a pattern that isn't there?
Does that address still look valid? Or does it contain invalid chars? Like hällö_thiß/is*not#an+email%[email protected]? That one will never make it through!

If it looks valid to you, please post the address part in front of the @ (you can leave out the domain part if you know that it exists for sure).
boylan wrote: If it is checking that the email address exists, can I turn that off?
It's checking that the address looks right, but doesn't check if it exists.
You can't turn that off for security reasons.
We may not be able to control the wind, but we can always adjust our sails

User avatar
boylan
Joomla! Apprentice
Joomla! Apprentice
Posts: 35
Joined: Fri Aug 19, 2005 10:55 am
Location: Gillette, NJ
Contact:

Re: Contact email always invalid

Post by boylan » Fri Sep 08, 2006 2:42 pm

I've tried email addresses that appear valid - like [email protected] and [email protected] - and I get the javascript popup described earlier. If I use an email address that I know to be a valid address that receives email, like one of mine - it goes through.

You can check out the page at http://welcome.preppermint.net/index.ph ... t&Itemid=3.  We're running it on IIS and PHP 5.

The wait between submission and approval/rejection is pretty long.  That's the only reason I thought it might be doing something more than just sending it off.

friesengeist
Joomla! Guru
Joomla! Guru
Posts: 842
Joined: Sat Sep 10, 2005 10:31 pm

Re: Contact email always invalid

Post by friesengeist » Fri Sep 08, 2006 2:58 pm

boylan wrote: I've tried email addresses that appear valid - like [email protected] and [email protected] - and I get the javascript popup described earlier. If I use an email address that I know to be a valid address that receives email, like one of mine - it goes through.

You can check out the page at [EDIT: URL removed]. 
Just sent you three test mails: two OK (sender exists), and [email protected], which gives me:
Fatal error: Maximum execution time of 30 seconds exceeded in F:\[path deleted]\joomla\includes\phpmailer\class.smtp.php on line 1024
boylan wrote: We're running it on IIS and PHP 5.

The wait between submission and approval/rejection is pretty long.  That's the only reason I thought it might be doing something more than just sending it off.
Seams so, but this time it's not Joomla! but a 3PD library bundled with Joomla!. Maybe your mailserver does a sender callout verification, and if that fails it does not deliver the mail but give you an error. If this is the case, I would say it's correct behaviour.
Last edited by friesengeist on Sat Oct 14, 2006 3:49 pm, edited 1 time in total.
We may not be able to control the wind, but we can always adjust our sails

User avatar
boylan
Joomla! Apprentice
Joomla! Apprentice
Posts: 35
Joined: Fri Aug 19, 2005 10:55 am
Location: Gillette, NJ
Contact:

Re: Contact email always invalid

Post by boylan » Fri Sep 08, 2006 3:45 pm

Sender callout verification was the problem.

Much thanks for your help, friesengeist!

User avatar
boylan
Joomla! Apprentice
Joomla! Apprentice
Posts: 35
Joined: Fri Aug 19, 2005 10:55 am
Location: Gillette, NJ
Contact:

Re: Contact email always invalid

Post by boylan » Sat Oct 14, 2006 7:14 am

I get a lot of test emails to my contact form, probably relating to this thread.  I no longer get the pop-ups, and my solution was to turn off "Sender callout verification".  If you are on a Cpanel server, you can turn it off at WHM > Exim Configuration Editor.

For more information on sender callout verification - visit http://www.exim.org/exim-html-4.50/doc/ ... tml#IX2587

friesengeist
Joomla! Guru
Joomla! Guru
Posts: 842
Joined: Sat Sep 10, 2005 10:31 pm

Re: Contact email always invalid

Post by friesengeist » Sat Oct 14, 2006 3:50 pm

boylan wrote: I get a lot of test emails to my contact form, probably relating to this thread.
I have removed the link to your page in one of my posts, you might wanna do the same with yours ;)
We may not be able to control the wind, but we can always adjust our sails

pozzo
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Sun Nov 05, 2006 8:46 pm

Re: Contact email always invalid

Post by pozzo » Sun Nov 05, 2006 9:01 pm

I have corrected the bug in contact XTD. Sending mail with phpmailer or smtp is now working with Joomla 1.0.11. I haven't tried with sendmail. Just unzip and manually install the contxtd.php fil in components\com_contxtd.
You do not have the required permissions to view the files attached to this post.

snowleopard7
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Nov 14, 2006 12:54 am

Re: Contact email always invalid

Post by snowleopard7 » Tue Nov 14, 2006 1:15 am

pozzo wrote: I have corrected the bug in contact XTD. Sending mail with phpmailer or smtp is now working with Joomla 1.0.11. I haven't tried with sendmail. Just unzip and manually install the contxtd.php fil in components\com_contxtd.
Hi, I'm having a problem sending any email out using this component in Joomla 1.0.11. I've linked all the contacts, but when I send an email (from our Public contacts page) nothing is recieved. Treid your fix too, no joy. Any ideas would be helpfull. Thanks.

Dragonlee
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Wed Jan 10, 2007 1:51 am

Re: Contact email always invalid

Post by Dragonlee » Fri Jan 12, 2007 8:42 pm

$mosConfig_live_site = 'http://www.yoursitename.com or org or whatever';
$mosConfig_mailer = 'smtp';
$mosConfig_mailfrom = 'kullanıcıadınız@sitenizinadı.com or org or whatever';
$mosConfig_ml_support = '1';
$mosConfig_smtpauth = '1';

$mosConfig_smtphost = ' mail POP3 and SMTP server info'; usually "mail.(unless www) your site name.com or org or whatever"

$mosConfig_smtppass = 'mail password';
$mosConfig_smtpuser = 'mail username';
$mosConfig_uniquemail = '1';

ITS WORK :)


Locked

Return to “Administration - 1.0.x”