.forward to several recipients

On *nix environments it is possible to forward the mail to one account to another user (or another email address if external mail is supported).
This is done by adding the recipient in a file called .forward in the home directory.

Example To simply forward to another address:

user@server$ echo recipient@mail.com > ~/.forward
user@server$ chmod go-w ~/.forward

In order to forward to several addresses coma (,) is used as a delimiter between the different recipients.

Example To forward to two addresses at the same time:

user@server$ echo recipient1@mail.com,recipient2@mail.com > ~/.forward
user@server$ chmod go-w ~/.forward

Magento: Invalid transactional email code: x

If you start seeing this error (both when trying to order) and as emails to the sales address then the error is most likely that someone has deleted the template with id x but that is still set to be used in the database.

The solution for this is to update “System-Configuration-Sales Emails” in admin and save existing templates instead of the template that is now removed.

Note: Also it might be good to consider why this happened, is there some (real) problem or was the template file(s) updated and some old database template was removed [perhaps there is an educational need].

Magento: Sending the info in the contact form to several email addresses

By default Magento only has one filed to input the recipient of the contact form (in admin).
If you would like to get this sent to several email addresses then a small hack is required as Magento adds some encding to address in this field.

Use

mail@example1.com>, name <mail@example2.com

to send to two recipients. name is the name shown as the address in the second mail.

Send contact form to two mail addressesv

To send to 3 addresses use

mail@example1.com>, name <mail@example2.com>,name2<mail@example3.com

To sent to 4 or more, just add more as in the 3 addresses example

Magento: Send a email to store owner when a order is placed.

It is not hard to set up a Magento multi store environment so when a order is placed in a store, a owner (one owner per store) gets a order confirmation email.
Doing like this will give a copy of the mail that is sent to the customer, and that might not be nice – but this is quick.

In admin, select the store you wish to enter the email address to, and under system > config > sales > sales e-mail override the site default with the email address you would like for this store.

It is also possible to send copies of shipment notices, credit mails etc (basically all mail that is sent from the store).

[Tested with v1.3.2.4]