Name in "To:" address overrules name in "Cc:" address?
Posted: Thu Mar 05, 2009 10:58 am
Most websites that offer e-mail forms don't bother to automatically return a copy to the sender. Whenever I make an e-mail form, I always have it send a copy to the visitor, usually with a text like "(your own copy)" after the Cc: e-mail address.
I am now implementing this in SwiftMailer. However, SwiftMailer seems to ignore the "name" parameter in the $Recipients->addCC() call and tacitly replaces it by the name specified in the $Recipients->addTo() call.
If I use another addTo instead of addCC, then the name specified in the first addTo is used for both copies!
Is this intentional, and if so, why?
Is there another way to have a different name for the CC adress, without sending the same message twice?
[edited/added:]
I now see that the above is not quite accurate. What actually happens is that the contents of the CC field is replaced by a copy of the contents of the To field. So if I do the following:
it actually executes as if I had given:
Changing the order of addTo and addCC does not help. So it is not a matter of the first one being overwritten by the secind one, but actually CC is overwritten bi To.
Am I doing something wrong, or is this a bug? In the latter case, will it be remedied in version 4?
I am now implementing this in SwiftMailer. However, SwiftMailer seems to ignore the "name" parameter in the $Recipients->addCC() call and tacitly replaces it by the name specified in the $Recipients->addTo() call.
If I use another addTo instead of addCC, then the name specified in the first addTo is used for both copies!
Is this intentional, and if so, why?
Is there another way to have a different name for the CC adress, without sending the same message twice?
[edited/added:]
I now see that the above is not quite accurate. What actually happens is that the contents of the CC field is replaced by a copy of the contents of the To field. So if I do the following:
Code: Select all
...->addTo ("addr1@isp1.tld", Addressee1);
...->addCC ("addr2@isp2.tld", Addressee2); Code: Select all
...->addTo ("addr1@isp1.tld", Addressee1);
...->addCC ("addr1@isp1.tld", Addressee1);Am I doing something wrong, or is this a bug? In the latter case, will it be remedied in version 4?