Email :: replaceReceiver - Change receiver's display name and address
Usually, the receiver display name is set before the message is composed. In order to be able to re-send a message several times to different addresses, the To option in the message header should be updated. In order to avoid reconstructing the message before each delivery, this function may be called for updating the message header, only.
Implementation overview
- Replace receiver name and address
Email :: replaceReceiver ( cName, cAddress ) - Change receiver's display name
Email :: replaceReceiver ( cName )
Implementation details
-
Replace receiver name and address
Email  :: replaceReceiver ( odaba::String &cName, odaba::String &cAddress )
The function replaces the receiver name and its address in the message header with the text passed in cName and cAddress.
- cName - - Title unknown
- cAddress - - Title unknown
to list
-
Change receiver's display name
Email  :: replaceReceiver ( odaba::String &cName )
The function replaces the receiver name in the message header with the text passed in cName. When the message has not yet been constructed, the receiver name is stored to the receiverName property, only. Before calling the function, the receiver should be set properly.
// osi fragment. receivers is a collection of users
// message has already been constructed
receivers.top;
while ( receivers.next ) {
if ( receivers.email == "" )
Message("Receiver " + receiver.first_name + ' ' + receiver.name + " without EMail address");
else {
names = receiver.first_name+' '+receiver.name+' <'+receiver.email+'>';
mail.replaceReceiverName(names);
if ( !SendMail() )
bState = false;
}
}
- cName - - Title unknown
to list