This code does what so many people do – sends an email with the alternate name set in the Principal field. But the problem is – it works within the Notes environment, but external emails display [BLANK] where there should be the sender name. That’s the problem. (I’ve been beating my head against the wall too long on t his one.)
Set doc = ui.Document
Call doc.ReplaceItemValue( “Principal”, doc.FromField(0) )
Call doc.ReplaceItemValue( “INetFrom”, doc.FromField(0) )
Call doc.ReplaceItemValue( “INetReplyTo”, doc.FromField(0) )
Call doc.ReplaceItemValue( “ReplyTo”, doc.FromField(0) )
Call doc.ReplaceItemValue( “From”, doc.FromField(0) )
Set ni = doc.GetFirstItem( “SendTo” )
Call doc.ReplaceItemValue( “INetSendTo”, ni.Values )
Call doc.ReplaceItemValue( “$StorageTo”, ni.Values )
Set ni = doc.GetFirstItem( “CopyTo” )
Call doc.ReplaceItemValue( “INetCopyTo”, ni.Values )
Call doc.ReplaceItemValue( “$Storagecc”, ni.Values )
Set ni = doc.GetFirstItem( “BlindCopyTo” )
Call doc.ReplaceItemValue( “INetBlindCopyTo”, ni.Values )
Call doc.ReplaceItemValue( “$Storagebcc”, ni.Values )
doc.Send( False )