sendmail ToAddr property
Return to Introduction  Previous page  Next page
Applies to
SendMail component.  

property ToAddr: String;  

The ToAddr property specifies the recipients of the message. You can specify any number of e-mail addresses and recipient names.  
The value of ToAddr property must have following format:  
"Name1" <address1>; "Name2" <address2> , "NameN" <addressN>  
The name of the recipient marked blue (must be between quotes ("), i.e: "John Smith"). You can leave the name blank and use just email address;  
E-mail address of recipient marked green (must be between brackets "<>", i.e: <>).  
Multiple recipients should be separated by semicolon (;) or comma (,).  
"John Smith" <>, <>, <>  
"Aleksey Kuznetsov" <>; "Webmaster" <>  
tip Alternatively, if you wish to specify multiple recipients, you can use ToCC property (carbon-copy). If you wish to hide some email addresses from message header — use ToBCC property (blind carbon-copy).  

iiwarning Please don't use brackets (< and >) in the "Name" fields (between quotes). Otherwise the address will be parsed incorrectly. For example, following address will be parsed incorrectly!!:  
"John<g> Smith" <>  
However, the parser is smart enough to parse definitions like these:  
"John Smith, Inc;" <>  
"Smith, "A" John" <>  

See also
ToCC and ToBCC properties.