Making WordPress.org

Changeset 11824


Ignore:
Timestamp:
05/10/2022 04:09:33 AM (3 years ago)
Author:
dd32
Message:

Helpscout: Update the list of phrases/terms that we consider to be a returned-mail.

See [11823].

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/api.wordpress.org/public_html/dotorg/helpscout/common.php

    r11823 r11824  
    3939    // Determine if this is a bounce, and if so, find out who for.
    4040    if ( ! $user && $email && isset( $request->ticket->id ) ) {
    41         $from = strtolower( $email . ' ' . ( $request->customer->fname ?? '' ) . ' ' . $request->customers->lname );
     41        $from          = strtolower( $email . ' ' . ( $request->customer->fname ?? '' ) . ' ' . $request->customers->lname );
     42        $subject_lower = strtolower( $subject );
    4243        if (
    4344            str_contains( $from, 'mail delivery' ) ||
    4445            str_contains( $from, 'postmaster' ) ||
    45             str_contains( strtolower( $subject ), 'undelivered mail' ) ||
    46             str_contains( strtolower( $subject ), 'returned to sender')
     46            str_contains( $from, 'mailer-daemon' ) ||
     47            str_contains( $subject_lower, 'undelivered mail' ) ||
     48            str_contains( $subject_lower, 'returned mail' ) ||
     49            str_contains( $subject_lower, 'returned to sender' ) ||
     50            str_contains( $subject_lower, 'delivery status' ) ||
     51            str_contains( $subject_lower, 'delivery report' ) ||
     52            str_contains( $subject_lower, 'mail delivery failed' )
    4753        ) {
    4854            // Fetch the email.
Note: See TracChangeset for help on using the changeset viewer.