Post by phpjunkie » Sun May 25, 2014 1:29 am

Hello all,

I've come across various postings on the Forum regarding some other Google Apps email issues, primarily the proper setup of SMTP. I have the SMTP settings working perfectly, so this is not an issue here.

My issue is that we use Google Apps as our email provider, and I'm trying to use a Distribution List email (an email address which sends to multiple users) as our main Store Settings email.

Our business is a 2 person partnership, and using the Distribution List email makes sense being that we'll both see Contact Form submissions, New Registrations, New Sales, etc... in both inbox's in real-time.

But the quirky problem here is that if I put the Distribution List email in my OpenCart settings, and then fire off a test Contact Us form -- nothing arrives. But on the flip side, if I put in my regular Google Apps email (an actual user email, not a distro list email), mail does seem to work just fine.

Any idea what might be happening here?

Newbie

Posts

Joined
Tue May 06, 2014 3:44 pm

Post by MarketInSG » Sun May 25, 2014 7:24 pm

How about setting up the additional notification emails in the mail settings tab?


User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by phpjunkie » Sun May 25, 2014 9:21 pm

MarketInSG wrote:How about setting up the additional notification emails in the mail settings tab?
This does not work either. As a test, I put my own personal Gmail account into the main E-Mail setting, and put the Google Apps Distribution List address into Mail>Additional Alert E-Mails

Upon testing with this setup, my Contact Us submission arrived at my personal Gmail inbox but did not forward through to any of the users in the distro list.

I'm actually thinking this entire issue is more a problem with the way OpenCart forms its EMAIL HEADER. I've noticed that the OpenCart email header setup looks like this:

from: (the email address that is setup in General>E-Mail)
reply-to: (the email address of the Contact Us form sender)
to: (the email address that is setup in General>E-Mail)

So essentially, the system is sending an email TO your hard-coded email address from store settings -- but it's sending this email with the FROM header field populated with the same email address. (which I do think is the entire problem)

Just having been around Google Apps and Distribution Lists for awhile, one of the features of these lists is they won't send the originating sender a copy of a message if they exist in the group.

For instance, you have a Distribution List email named sales@domain.com setup with 3 users:

joe@domain.com
pete@domain.com
john@domain.com

Typically all 3 inbox's will receive a copy of any message -- UNLESS one of these users was the original sender of the message. Google Apps is smart enough to realize the sender is part of the Distro List, and will only send this message to the other members.

I'm thinking that's exactly what's going on here. Upon receipt of the Contact Us form submission, Google Apps sees that the message is being sent TO sales@domain.com -- BUT -- that it's also coming FROM this address. So Google Apps stops delivery using the same logic as the example above.

Assuming this is in fact what's happening, is it easy enough to modify the way email headers are formed by OpenCart? Would I be able to change the "from:" field in the header to always be populated by the Contact Us form sender, and/or a Customer in the case of sales notifications?

Newbie

Posts

Joined
Tue May 06, 2014 3:44 pm

Post by MarketInSG » Mon May 26, 2014 11:57 am

If that's the case, it should be pretty easy. Head over to catalog/controller/information/contact.php and modify the $mail->setFrom() values, and change it to be sending from another email address.


User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by phpjunkie » Mon May 26, 2014 12:13 pm

MarketInSG wrote:If that's the case, it should be pretty easy. Head over to catalog/controller/information/contact.php and modify the $mail->setFrom() values, and change it to be sending from another email address.
I'm not at my main computer right now to actually look at the contents of catalog/controller/information/contact.php

-- But basically I would be simply trying to manipulate the header so that it always creates the FROM and TO fields as the person that sent the email. Whether that be through the Contact Us form, or via new Sale.

See the following image:

Image

** The forum is cutting some of the image off. Here's the direct image link http://i.imgur.com/Ov2ZfAN.png

Any suggestion on how to do this in catalog/controller/information/contact.php ? Or would I actually be looking to modify /system/library/mail.php to accomplish this?

Newbie

Posts

Joined
Tue May 06, 2014 3:44 pm
Who is online

Users browsing this forum: No registered users and 33 guests