Post by dragonturbo3 » Fri Apr 13, 2018 1:08 am

Not sure what caused this issue but if anyone can point me in the right area to fix it I would appreciate it.

When a customer uses the contact form to ask a question I get the users name but not their email. My own email comes through with their name.
Here is what the email looks like.
-------- Original Message --------
Subject: Enquiry Eric
From: Eric <info@casterracingparts.com>
Date: Tue, April 03, 2018 5:04 am
To: info@casterracingparts.com

Hi, I am considering purchasing a used nice condition Caster S10SC. I haven’t owned a Caster product before so I was wondering about parts availability. I noticed the truck itself is out of stock. Are all the parts still available if I were to need something? I looked through the parts listing but it seemed like some items weren’t listed. Is the truck still being produced or is it discontinued? Just afraid of buying something that I can’t get parts for if something were to break. Thanks for your time, Eric


As you can see the from line has the customers name but has my stores email address. And nowhere else is the customer's email. I thought maybe this was a onetime thing, but all customers that have used the contact form have come the same way.

I have looked through the forums for this as it seems like it would be a fairly common issue but could not find anything. Thanks in advance for any help.

Open Cart Version 3.0.2.0

Newbie

Posts

Joined
Thu Aug 18, 2011 1:30 pm

Post by JamSearch » Fri Apr 13, 2018 2:24 am

I have the same problem exactly.

Newbie

Posts

Joined
Fri Apr 13, 2018 2:15 am

Post by paulfeakins » Fri Apr 13, 2018 4:56 pm

This is default OpenCart behaviour - if it sent from the customer's email address there would be a much higher chance of the email ending up in spam.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by JamSearch » Sun Apr 15, 2018 2:06 am

So is there a solution to the problem. Maybe another way of setting up the email? I'm a little lost here. I have tried several different settings and cannot get the correct results.

Newbie

Posts

Joined
Fri Apr 13, 2018 2:15 am

Post by dragonturbo3 » Tue Apr 17, 2018 12:21 am

Thanks paulfeakins,
I understand that being sent from the carts address is necessary but in the contact form, it requests the customer's email address. But on the store owners end that email address is never relayed and therefore I have not been able to reply to any customer questions.

Newbie

Posts

Joined
Thu Aug 18, 2011 1:30 pm

Post by JamSearch » Tue Apr 17, 2018 3:01 pm

I have been experimenting with the OpenCart software for a few weeks now and I think it's pretty great. It is a shame to have such a major bug that cannot be fixed. The contact page is useless. Why even have it? It works but you don't know who sent the message. ??? It defeats it's purpose.

Newbie

Posts

Joined
Fri Apr 13, 2018 2:15 am

Post by xxvirusxx » Tue Apr 17, 2018 3:18 pm

Yep, From email is read from oc setting

LE. To show customer email addres in "From" you need to edit:

Code: Select all

catalog/controller/information/contact.php
Delete or comment this line:

Code: Select all

$mail->setFrom($this->config->get('config_email'));
And change this line:

Code: Select all

$mail->setReplyTo($this->request->post['email']);
In this line

Code: Select all

$mail->setFrom($this->request->post['email']);
Also work if you have both line the same

Code: Select all

$mail->setFrom($this->request->post['email']);
$mail->setReplyTo($this->request->post['email']);

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by dragonturbo3 » Tue Apr 17, 2018 11:13 pm

Thanks xxvirusxx,
I am going to give this a shot now.

Newbie

Posts

Joined
Thu Aug 18, 2011 1:30 pm

Post by dragonturbo3 » Tue Apr 17, 2018 11:20 pm

xxvirusxx,
Before I do this it looks like the code will swap out the carts address for the customers in the from field, but is there any way to just have the customer's email show up in the body of the email?

Newbie

Posts

Joined
Thu Aug 18, 2011 1:30 pm

Post by ADD Creative » Wed Apr 18, 2018 12:09 am

Looking at the code for 3.0.2.0. The reply to address is correctly set to the customer's email address. https://github.com/opencart/opencart/bl ... ct.php#L21

This seems the correct way of doing things. If you reply to the email, your email client should reply to the reply to address not the from address. Do you see the reply to address set correctly in the email headers?

Setting the from address as the customer's email address will cause problems if the customer's email domain has sender policy framework is set up correctly to fail messages sent from other servers. As your server won't be on the allowed list for the customer's email domain, any receiving mail server checking the SPF record could reject the email.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by xxvirusxx » Wed Apr 18, 2018 1:44 am

I don`t think is correctly...because when you compose an email you enter address only in "To:" field. When press reply will read automatically address from "From:" and isn`t necessary to have another field Reply-To...

oc 2.3.0.2 code

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by ADD Creative » Wed Apr 18, 2018 7:40 pm

The customer's email was used in from field in the past. However this was found to cause problems with emails being rejected due to systems used to prevent email spoofing, such as Sender Policy Framework . This is why is was changed and the reply to field correctly added.

Providing you are correctly setting the reply to field, you email client should reply to the correct address.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by JamSearch » Thu Apr 19, 2018 12:19 am

Thank you so much xxvirusxx . Works great. That's all I needed.

Newbie

Posts

Joined
Fri Apr 13, 2018 2:15 am

Post by JamSearch » Thu Apr 19, 2018 2:55 am

...

Newbie

Posts

Joined
Fri Apr 13, 2018 2:15 am

Post by Shortyme » Thu May 03, 2018 4:17 am

Thank you xxvirusxx, I`ve read this topic and changed the lines like you said but no effect. Still have the same problem. Am I missing something ? It matters if I use a template other than the default one? I use outlook for email. I hope there is a solution to this matter because it is kind of annoying.

When in doubt, you should go around !


User avatar
Newbie

Posts

Joined
Fri Mar 03, 2017 5:42 pm
Location - Bucharest

Post by ADD Creative » Thu May 03, 2018 5:35 am

The problem is actually seems due to Windows 10 Mail and some versions of Outlook wrongly ignoring the reply-to field. The workaround posted should work. Have you tried refreshing the modifications cache?

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by Shortyme » Fri May 04, 2018 12:40 am

Hello,
I forgot to refresh the modification cache. Thanks for the tip ! :)
I will do more testing and see if I get through this.

LE: I flushed the cache and now I receive everything like it should !
Thank you guys, and good luck everyone with their projects !

When in doubt, you should go around !


User avatar
Newbie

Posts

Joined
Fri Mar 03, 2017 5:42 pm
Location - Bucharest

Post by lovenatural » Thu Sep 20, 2018 4:54 am

Hi I have i think a similar problem with 3.0.2.
I am not receiving emails submitted via contact page.
When i am checking webmail records on server it shows undelivered email with this error:

"A message that you sent using the -t command line option contained no
addresses that were not also on the command line, and were therefore
suppressed. This left no recipient addresses, and so no delivery could
be attempted. "

I have tried the solution described here, and it did not help (yes caches cleared on browser and on modification as well).
Can you please help?

New member

Posts

Joined
Sat Aug 08, 2015 12:04 am

Post by ADD Creative » Thu Sep 20, 2018 8:05 pm

This thread is about working around in issue with some mail clients ignoring the reply to address.

You issue sounds like your server is not sending emails at all, which is likely a server configuration issue. What are your mail setting set to? So you get order notification emails to the admin email address?

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by lovenatural » Thu Sep 20, 2018 11:52 pm

My hosting is hostgator. Mail settings set to
MAIL engine Mail
mail parameters: store@mydomainname.com
smtp user: store@mydomainname.com
tls://mydomainname.com
smtp port 465
smtp timeout 25

This is only settings that work for when people registered or lost password, they get the confirmation email or forgot password link. So yes server does sends out automatically generated emails for registration and for forgot password. But it turned out i just found out that contact us email is not being sent. The error i showed you i found in webmail. It looks like server is trying to send it, but it cant because according to this error it is looking for recipient address in the form and not finding it.

New member

Posts

Joined
Sat Aug 08, 2015 12:04 am
Who is online

Users browsing this forum: No registered users and 259 guests