I would like to use a token in the "Sender" field for the admin checkout notification email (sends an order invoice). When I do, however, I receive the following error in the watchdog log:
"Error sending e-mail (from [order-email] to user@example.com)" I would expect this field to be checked for tokens since the help info for that field reads: "Enter the 'From' email addresses, or leave blank to use your store email address. You may use order tokens for dynamic email addresses." I would expect tokens to be replaced for this field using similar logic used in uc_order.ca.inc line 1213:

  // Apply token replacements to from e-mail address.
  $from = token_replace_multiple($settings['from'], $settings['replacements']);
  if (empty($from)) {
    $from = uc_store_email_from();
  }

To accomodate this, I simply applied this logic near line 1309 in uc_order_ca.inc for the uc_order_action_email_invoice function as well as uc_order.module's uc_order_mail function near line 596. I have attached the patch file that needs to be tested for this to work. Please let me know if you need it to be adjusted an d I can re-roll.

Files: 
CommentFileSizeAuthor
#2 1828290-email-sender-tokens.patch1.79 KBlongwave
PASSED: [[SimpleTest]]: [MySQL] 2,073 pass(es).
[ View ]
uc_order-email-from.patch2.77 KBpcorbett
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch uc_order-email-from.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Comments

Status:Needs review» Needs work

The last submitted patch, uc_order-email-from.patch, failed testing.

Status:Needs work» Needs review
StatusFileSize
new1.79 KB
PASSED: [[SimpleTest]]: [MySQL] 2,073 pass(es).
[ View ]

This patch is a simplified version of the one you posted; if you could test it that would be appreciated.

Works for me.

Status:Needs review» Fixed

Committed.

Automatically closed -- issue fixed for 2 weeks with no activity.