♥14steve14 Posted April 17, 2016 Posted April 17, 2016 I have latest version of oscommerce with Bootstrap. I am having a problem with the contact us form when customers send anything. With lots of testing and setting changes I am unable to get the form to send any emails to the store owner. The information sent arrives in the catch all email on my hosting account. In the headers this is the first bit of the message. A message that you sent was rejected by the local scanning code thatchecks incoming messages on this system. The following error was given:Sorry, you don't have permission to send email from this server with aheader that states the email is from outlook.com.------ This is a copy of your message, including all the headers. ------Received: from ********** by **********.thewebhostserver.com with local (Exim 4.86_1)(envelope-from <*********@********.thewebhostserver.com>)id 1arkwF-0045y5-13; Sun, 17 Apr 2016 12:32:27 +0100To: ********@mtsite.comSubject: Enquiry from Railway********X-PHP-Script: www.mysite.com/contact_us.php for 86.145.166.87From: "Stephen Lane" <steve******@@outlook.com>To: "Stephen Lane" <sales@********.com>MIME-Version: 1.0X-Mailer: osCommerceContent-Type: multipart/alternative;boundary="=_24dddf4e66ffe841e9a3ccf1ac30cfab"Message-Id: <E1arkwF-0045y5-13@********.thewebhostserver.com>Date: Sun, 17 Apr 2016 12:32:27 +0100--=_24dddf4e66ffe841e9a3ccf1ac30cfabContent-Type: text/plain; charset="utf-8"Content-Transfer-Encoding: 7bitLets try another email address and see if that works. I bet it doesnt.--=_24dddf4e66ffe841e9a3ccf1ac30cfabContent-Type: text/html; charset="utf-8"Content-Transfer-Encoding: quoted-printableLets try another email address and see if that works. I bet it doesnt.--=_24dddf4e66ffe841e9a3ccf1ac30cfab-- Now the bit in red at the top outlook.com is changing on every test email I send as its the last part of the customers email address that is entered. Where does oscommerce pick this up from as I have reverted all the contact us form and the includes/classes/email back to the original and its still does not work. For some reason the contact us form is sending the customers email address. Has anyone come across something like this before, or know what the possible cause could be. My hosts recon that its because oscommerce is so old. REMEMBER BACKUP, BACKUP AND BACKUP
MrPhil Posted April 17, 2016 Posted April 17, 2016 My guess would be this line in contact_us.php: tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $enquiry, $name, $email_address); It appears to be using the customer's $email_address as the "from" field, rather than the store's email address. That should be a simple change to fix, as the mail is actually being sent by the store, not the customer. You might also want to change $name to "Store Contact". If this is the fix, you'll need to add the customer email and name to the body of the mail ($enquiry) so it's not lost.
♥kymation Posted April 17, 2016 Posted April 17, 2016 osCommerce is set up that way so the the store owner can reply to the customer using the Reply button in their email client. This is the first time I've heard of any problem with tins. It's going to be a mess if you don't find a fix for it. The cause appears to be some setting or software that your host has set up. I suggest contacting them and telling them about this problem. They should be able to turn this off for you. If they won't, get a different host. Regards Jim See my profile for a list of my addons and ways to get support.
MrPhil Posted April 17, 2016 Posted April 17, 2016 Isn't that standard anti-spoofing that more and more mail systems are implementing? If your incoming mail claims to be from XYZmail.com, it verifies that its IP address matches or it has granted permission for certain foreign systems to claim to be them. Something like that (SPF?). I'm surprised that more people haven't had problems with this.
♥kymation Posted April 18, 2016 Posted April 18, 2016 Does anybody know whether osCommerce is using the FROM header or the REPLY TO header? Could be that we're doing it wrong. I don't have time to go look through the email class right now, but I'll try to tomorrow if nobody else comes up with the answer. Regards Jim See my profile for a list of my addons and ways to get support.
Dan Cole Posted April 18, 2016 Posted April 18, 2016 @@kymation Jim see this thread. I've bumped into the Reply/Return Path issue a couple of times. Dan Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here.
♥14steve14 Posted April 18, 2016 Author Posted April 18, 2016 Thanks for the replys here. I was away yesterday, so have been unable to reply sooner. It is a change to a new better hosts that has brought this to my attention. After contacting my hosts, they pointed me to ask here. As others have said, its a security and anti spam thing that is causing the error. Here is the reply that I have received from my hosts, who it would appear are trying to help correct this. Hi Steve, I see what you mean now. I've sent another test enquiry, this time using [email protected] in the "E-Mail Address" field, explaining the issue, which you will have received. For convenience this is what I wrote: ------------ The issue is that whatever is entered in the "E-Mail Address" field, is used as the "From" - the sender, rather than [email protected] So the problem is the contact form itself. I can imagine they originally did this so you'd see the "From" as the person that submitted the contact request, but it's obviously not sending from their email address. Their email address should instead be in the body of the email or the subject, and the "From" field should always be [email protected] So this email should get through, as I've entered [email protected] as the E-Mail Address. ------------ If you search regarding that on the osCommerce forums/support then you should find a solution. It's very bad contact form design. If you enter my store email address as the customers email address in the contact form I get the full message as I should. Looks like a bit of further investigation is required and a re write of the contact us page. Might pass this across to 'the team' as a bug and see if they think its worthwhile doing something with. REMEMBER BACKUP, BACKUP AND BACKUP
♥14steve14 Posted April 18, 2016 Author Posted April 18, 2016 @@Dan Cole That seems to have cured any problems I was having. I spent ages searching for something that may have been an answer, but that post did not appear in any search. All emails seem now to be coming through as they should. Even the ones from the modified contact us so that customers know they have sent us a message. Just need to find an addon now that will include a copy of the message for them. Will also mention this to Gary. He may think it worth while altering the core of the bootstrap version. REMEMBER BACKUP, BACKUP AND BACKUP
Dan Cole Posted April 18, 2016 Posted April 18, 2016 Will also mention this to Gary. He may think it worth while altering the core of the bootstrap version. @@14steve14 He may have done it already...I seem to remember seeing a commit but it doesn't hurt to ask. Dan Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here.
♥14steve14 Posted April 18, 2016 Author Posted April 18, 2016 I have let him know, so its really whether he thinks it important enough to add, or check that its been already changed. Its now in my list of core code changes, so should I ever update again I know I have to check and alter if not already done. I just wish that that post came up in my google search. Thanks for the headsup. That earlier post saved me lots of head scratching. REMEMBER BACKUP, BACKUP AND BACKUP
MrPhil Posted April 20, 2016 Posted April 20, 2016 I modified Burt's 2.3.4BS contact page (http://www.oscommerce.com/forums/topic/408475-recaptcha-v2-looks-so-cool/page-4#entry1739381) for a non-osC site so that the contact name and email are added to the message body, and the "From" address is my site. This avoids the problem of a mail being rejected by anti-spam/anti-spoof guards, but at the cost of not being able to hit "Reply" and get the sender's email with one action. I'd love to see mail systems (and clients) that notice a mismatch when hitting Reply, and if such exists, warn you that this might be a problem and do you really want to proceed. I realize that some people will automatically hit "Yes" without thinking about it, but at least it wouldn't forbid replying. Putting the customer email address up at the top of the mail's body would help reassure users (in this case, the store owner).
Recommended Posts
Archived
This topic is now archived and is closed to further replies.