Jump to content

Archived

This topic is now archived and is closed to further replies.

Dan Cole

Email Return Path

Recommended Posts

This looks like something that should be added to the core...maybe one of you GitHub gurus could make a commit for it, if you agree. I would but I can't seem to make heads or tales of GitHub.

 

http://addons.oscommerce.com/info/5007

 

Dan

Share this post


Link to post
Share on other sites

I ended up revisiting this issue again. The contribution referenced here solves the problem when calling the tep_mail function but not when you create a new instance of the email class as one of my favorite contributions does. The email header seems to be set when the instance is created so I made the following change...

 

// $mimemessage = new email(array('X-Mailer: osCommerce System Mailer'));

 

$mimemessage = new email(array('X-Mailer: osCommerce System Mailer','Return-Path: <' . STORE_OWNER_EMAIL_ADDRESS . '>'));

 

In revisiting this I also realized that I didn't explain why I got on this tangent. What happened was that I was looking for ways to improve my delivery rate for emails and one of the things I read was that I should ensure that my "Return-Path:" email address matches my "Sent/From:" address. I got looking at that and realized that it didn't match on any of my osC mailings. Using the regular tep_mail fuction didn't add the "Return-Path:" and as a result the "Return-Path:" was set by my host by default.

 

It was suggested that this was a problem since the default "Return-Path:" doesn't match my "Sent/From:" address. I don't know how important this is but it is reported that some ISPs are now dropping or returning emails when there is no match, believing the email to be spam.

 

In those circumstances when a bounce occurs it is sent to the default "Return-Path:" email address even though the "Sent/From:" address is to my email address. So the first issue is I don't know what emails fail and therefore can't take the appropriate action to sort it out. The bigger issue is that, with the adoption of DMARC standards, checking that the "Return-Path:" domain matches the "Sent/From:" address is becoming more common place. What the receiving host of the emails do with those email messages is up to them but it looks like some of the major email hosts are taking the lead on this and they are actually rejecting the email messages...ie Yahoo and AOL...this practice might well and will likely become the standard as more hosts and emailers support DKIM and SPF. Here are a couple of links that might help in understanding what changes are taking place but basically I think it is critical to add the "Return-Path:" to our email Headers to prevent a default "Return-Path:" from being added.

 

http://www.dmarc.org/

http://en.wikipedia.org/wiki/DMARC

http://blog.madmimi.com/yahoo-dmarc-changes-email-marketing/

 

FWIW...

 

Dan

Share this post


Link to post
Share on other sites

Good point and I propose the replyto option in contact-us mails.


:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Share this post


Link to post
Share on other sites

Agreed...IMO the Return-Path should be added to all emails generated by the shop...I think it will become increasingly important to do so. It looks like the contact us page uses the tep_mail function so the change mentioned in my first post should fix that. We just need someone to propose it on GitHub...I think.

Share this post


Link to post
Share on other sites

@@Dan Cole

I have just fixed a gmail addressed smtp oscommerce host with similar settings but there could be strong code differencies between the smtp used in php mail() function or an unique php class as phpMailer.

Moreover there are could be non-smtp hosts so we cant do return-path setting in sendmail.


:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Share this post


Link to post
Share on other sites

Maybe separate functions within the email class that can be used depending on the stores email configuration? I have no idea what other email methods you might want to provide for though.

Share this post


Link to post
Share on other sites

×