Class MailAddress() Professional

Class function of the MailAddress class.


Instances of the MailAddress class take care of the various formatting rules for e-mail addresses. For example, all following addresses are valid e-mail addresses of the same person:

John Doe <> 
"John Doe" <> (The good guy) 

Therefore, the definition of sender and recipient addresses of an e-mail is done using MailAddress objects.

Class methods
Creates an instance of the MailAddress class.
Instance methods
Retrieves the e-mail address as character string.
Defining sender and recipient of an e-mail
// The example is a code snippet that demonstrates the 
// context where MailAddress objects are used. See the 
// MIMEMessage() class for a comprehensive example. 

oMail      := MIMEMessage():new() 
oSender    := MailAddress():new( "John <>", .T. ) 
oRecipient := MailAddress():new( " ( lovely wive )" ) 

oMail:setFrom( oSender ) 
oMail:addRecipient( oRecipient ) 

? oSender:getString()       ->     "" 
? oRecipient:getString()    ->     " ( lovely wive )" 


If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.