Results 1 to 9 of 9
  1. #1
    Join Date
    Sep 2004
    Posts
    2,420
    Plugin Contributions
    2

    Default Email from (phpmail) marked as spam

    Note: On creating this post in the Zen Cart forum, clicking Preview completely erased the post so I had to start again. Argh.

    ---------

    Recently "order confirmation email" sent from Zen Cart began getting marked as spam. In the email headers I note two new spam score entries.

    XPRIO ("Has X-Priority header")
    KAM_ASCII_DIVIDERS ("Spam that uses ascii formatting tricks")

    I assume I can edit phpmail library code so the XPRIO header is not added to email sent from Zen Cart. And that I can alter the formatting of email sent from Zen Cart to avoid the KAM_ASCII_DIVIDERS score.

    I was not aware of this issue until after upgrading to ZC 1.54

    Any recommends?

    Note the store is configured to sent only TEXT formatted email.

    Thanks.

  2. #2
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,379
    Plugin Contributions
    9

    Default Re: Email from (phpmail) marked as spam

    Quote Originally Posted by Woodymon View Post
    .....

    Recently "order confirmation email" sent from Zen Cart began getting marked as spam. In the email headers I note two new spam score entries....
    Two questions:

    How did you find out that your order confirmation emails are marked as spam - from clients or from a copy which you receive?

    Is your site on a shared server?

  3. #3
    Join Date
    Sep 2004
    Posts
    2,420
    Plugin Contributions
    2

    Default Re: Email from (phpmail) marked as spam

    Quote Originally Posted by frank18 View Post
    Two questions:

    How did you find out that your order confirmation emails are marked as spam - from clients or from a copy which you receive?

    Is your site on a shared server?
    Thanks. The two score entries show up in order confirmation email spam score headers in email messages Zen Cart sends to both the customer and in the copy sent to the store.

    I want to be able to edit the stores outgoing emails to prevent the inclusion of those two email (meta) headers. I suspect in a phpmailer class file built into Zen Cart generates the X-Priority entry (which is completely unnecessary). This is the primary issue I wish to resolve.

    As to the secondary issue, possibly some CSS responsible for the layout of the outgoing email messages, generates the KAM_ASCII_DIVIDERS score

    I was hoping someone here may have observed/dealt with the same issues. I may have to contact the phpmailer developer to figure this out.

  4. #4
    Join Date
    Sep 2004
    Posts
    2,420
    Plugin Contributions
    2

    Default Re: Email from (phpmail) marked as spam

    Also, looking at file modify dates for the ZC 1.54 files in the online shop, I notice /includes/classes/class.phpmailer.php has a recent date of Aug 31, 2015. Whereas most the other files show Dec 24, 2014.

    I don't recall modifying that file. I try to be diligent in documenting the patches I install. Was a patch for that file released by the ZC developers, that may have updated that file, and I forgot to document the patch install?

    Comments in the file header show PHPMailer Version: 5.2.6

    I'll do a compare with the core 1.54 version to see what's diff.
    Last edited by Woodymon; 3 Dec 2015 at 06:32 PM.

  5. #5
    Join Date
    Sep 2004
    Posts
    2,420
    Plugin Contributions
    2

    Default Re: Email from (phpmail) marked as spam

    Below is relevant code from phpmailer 5.2.6 in ZenCart 1.54 class.phpmailer.php

    Any recommends on the best way to keep X-Priority from being included in the sent email header?

    ln 54
    Code:
    public $Priority          = 3;
    ln 1438-1446
    Code:
        $result .= $this->HeaderLine('X-Priority', $this->Priority);
        if ($this->XMailer == '') {
            $result .= $this->HeaderLine('X-Mailer', 'PHPMailer '.$this->Version.' (https://github.com/PHPMailer/PHPMailer/)');
        } else {
          $myXmailer = trim($this->XMailer);
          if ($myXmailer) {
            $result .= $this->HeaderLine('X-Mailer', $myXmailer);
          }
        }

  6. #6
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: Email from (phpmail) marked as spam

    You may wish to upgrade to a newer version of PHPMailer. As of Jun 29, 2015, releases of PHPMailer no longer set the "X-Priority" header by default. This change appears to have been made to appease a rule sometimes enabled in SpamAssasin.

    If you wish to manually patch PHPMailer instead of upgrading to a newer version, take a peek at the committed patch to PHPMailer.
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  7. #7
    Join Date
    Sep 2004
    Posts
    2,420
    Plugin Contributions
    2

    Default Re: Email from (phpmail) marked as spam

    Quote Originally Posted by lhungil View Post
    You may wish to upgrade to a newer version of PHPMailer. As of Jun 29, 2015, releases of PHPMailer no longer set the "X-Priority" header by default. This change appears to have been made to appease a rule sometimes enabled in SpamAssasin.
    Right on, lhungil. As always you are the man ;-)

    I searched through the github issues but didn't find anything that applied. Thanks for the recommends.

    So to upgrade the phpmailer in Zen Cart 1.54, do I just copy the latest version 5.2.14 class.phpmailer.php (from github) to /includes/classes/class.phpmailer.php ?

    Do I need to copy any other phpmailer github files over? (e.g. class.smtp.php) or make other changes to Zen Cart?

    Thanks.

  8. #8
    Join Date
    Sep 2004
    Posts
    2,420
    Plugin Contributions
    2

    Default Re: Email from (phpmail) marked as spam

    FYI, I just copied the updated class.phpmailer.php file over to /includes/classes/ and ran a few tests on the shop and the issue appears resolved. Thanks again.

  9. #9
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Email from (phpmail) marked as spam

    FYI, ZC v1.5.5 will contain the phpMailer 5.2.14 code
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Email from my site recieved in SPAM folder
    By edux10 in forum General Questions
    Replies: 2
    Last Post: 21 Feb 2011, 11:17 PM
  2. From Email not showing properly and Contact Form Spam?
    By mask2011 in forum General Questions
    Replies: 4
    Last Post: 26 Oct 2010, 08:26 AM
  3. Spam sent from my own email to my own email?!?
    By DML73 in forum General Questions
    Replies: 3
    Last Post: 23 Mar 2008, 06:50 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR