Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter presbycan

    (@presbycan)

    I was not aware of how the “Remember Me” box puts a 14-day cookie on one’s browser, so that we don’t have to login every time as long as we don’t logout and go directly to “https://myblog.com/wp-admin/” next time, even if we close our browser. Your plugin as currently configured honors that. The only way to do it across devices would be to keep a record of the user’s “trusted devices” (browser, hardware, email) in a database, and that seems like overkill.

    presbycan

    (@presbycan)

    You’re right. The $phpmailer object doesn’t persist, but an instance is created with the first e-mail in each new sequence of e-mails. That means that $Sender cannot be altered before an instance of $phpmailer is created, only afterwards, correctly setting the Return-Path for the second and all subsequent e-mails in that sequence. A single e-mail cannot be sent out by itself with the correct Return-Path using this command. If you can advise me on the correct way to attach a filter to the phpmailer hook so that the value is set BEFORE the first e-mail is set, it might solve some problems.

    presbycan

    (@presbycan)

    A much simpler solution in a plugin before wp_mail():

    global $phpmailer;
    $phpmailer->Sender = $return_path;

Viewing 3 replies - 1 through 3 (of 3 total)