Method MIMEMessage():addHeader() Foundation

Adds a header field.

:addHeader( <cName>, <xValue> ) --> NIL
This parameter is a character string describing the name of the e-mail's header field to add.
This value is a character string of an object which is added to the header. If this parameter is an object, it must have a method :getString()

The return value is NIL.


The method :addHeader() is used to add header fields in an e-mail for which no specific method exists in the MIMEMessage class. If <cName> is "From", "Date", "subject", "content-type" or "content-transfer-encoding" then <cValue> is not added but replaced. Examples are a reply address, carbon copy address or blind copy address fields:

oMimeMessage:addHeader( "Reply-To", "" ) 
oMimeMessage:addHeader( "CC"      , "" ) 
oMimeMessage:addHeader( "BCC"     , "" ) 


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.