| Project: | Ubercart |
| Version: | 6.x-2.x-dev |
| Component: | Orders |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
| Issue tags: | token |
Issue Summary
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.
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| uc_order-email-from.patch | 2.77 KB | Idle | 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 details |
Comments
#1
The last submitted patch, uc_order-email-from.patch, failed testing.
#2
This patch is a simplified version of the one you posted; if you could test it that would be appreciated.
#3
Works for me.
#4
Committed.
#5
Automatically closed -- issue fixed for 2 weeks with no activity.