PATH  WebObjects 4.0 Documentation > What's New in WebObjects 4.0

Table of Contents Previous Section

WOMailDelivery Class

WOMailDelivery uses the WOSendMail tool to construct an email from a file and send it using SMTP. It requires an SMTP server to be set (the default value for the SMTP hostname is "smtp"; you can change this value with defaults write NSGlobalDomain WOSMTPHost hostName or by supplying the hostname as a WOApplication command-line argument).

WOMailDelivery defines the following methods:
WOMailDelivery
Method Description
sharedInstance Returns the shared WOMailDelivery object to which you should send the composeEmailFrom... and sendEmail: messages.
composeEmailFrom:to:cc:subject:plainText:send: Composes an email message with a textual body and optionally sends it. The content type is set to Content-type: TEXT/PLAIN; CHARSET=US-ASCII.
composeEmailFrom:to:cc:subject:component:send: Composes an email message (and optionally sends it) where the body is the HTML that results when generateResponse is sent to the specified component. Note that the HTML generated is different from what would be generated in a request-response loop: all URLs in the page are complete (from http://) so that the mail reader can follow the links on the mailed page.
sendEmail: Sends an email message created with one of the WOMailDelivery composeEmailFrom... methods.

Table of Contents Next Section