theillo Posted April 18, 2015 Share Posted April 18, 2015 When I use my contact form and enter a gmail address, I receive an error message ( the error message from Line 197 from file \controllers\front\ContactController.php ) I hit the send button again, it shows a success message, and sends the "your message has been successfully sent" email. But I don't receive email notification that I have a new inquire on the admin email. No problems with gmx addresses. So again: Putting Gmail addresses in contact form: takes 2 tries to send does not send a notification to the admin I assume what messes it up is "spoofing" I've had that before where I tried to set the "from" email address to a gmail address and that caused it to fail. So it could be relatively specific to my server. But I'd assume others have this problem, too. I wish I had the time and energy right now to analyze this cluster f**k of code that triggers the error, but I don't. No offense... Isn't there supposed to be a rule "if a function has more then 3 arguments, pass the arguments as an object or an associative array"? I'm no code pro, but I'm just sayin'... I KNOW you're not supposed to make a line longer than fits on the screen. This doesn't fit on my 22" monitor. Anyways... Here is how the error gets triggered: \controllers\front\ContactController.php line 197 if (empty($contact->email)) Mail::Send($this->context->language->id, 'contact_form', ((isset($ct) && Validate::isLoadedObject($ct)) ? sprintf(Mail::l('Your message has been correctly sent #ct%1$s #tc%2$s'), $ct->id, $ct->token) : Mail::l('Your message has been correctly sent')), $var_list, $from, null, null, null, $file_attachment); else { if (!Mail::Send($this->context->language->id, 'contact', Mail::l('Message from contact form').' [no_sync]', $var_list, $contact->email, $contact->name, $from, ($customer->id ? $customer->firstname.' '.$customer->lastname : ''), $file_attachment) || !Mail::Send($this->context->language->id, 'contact_form', ((isset($ct) && Validate::isLoadedObject($ct)) ? sprintf(Mail::l('Your message has been correctly sent #ct%1$s #tc%2$s'), $ct->id, $ct->token) : Mail::l('Your message has been correctly sent')), $var_list, $from, null, $contact->email, $contact->name, $file_attachment)) $this->errors[] = Tools::displayError('An error occurred while sending the message. Please try resending.'); } I added the part where it says "please try resending" Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now