| com.caucho.vfs.MailtoPath
MailtoPath | public class MailtoPath extends Path (Code) | | The mailto: scheme sends mail using the SMTP protocol.
Attributes set headers. Headers can be set as long as no data
has been flushed.
WriteStream os = Vfs.openWrite("mailto:nobody@foo.com");
os.setAttribute("subject", "Reminder message");
os.println("This is just a simple reminder.");
os.close();
The attributes set SMTP headers:
- subject - message subject
- to - recipient
- cc - copy list
- bcc - blind copy list
- X-foo - user-specified header
You can also set attributes in the URL as query parameters.
Vfs.openWrite("mailto:nobody@foo.com?subject=dinner");
|
Inner Class :static class Recipient | |
getAttribute | public Object getAttribute(String name)(Code) | | Gets the value of the RFC822 message headers.
|
getPath | public String getPath()(Code) | | The path looks like "mailto:user@host.com"
|
getScheme | public String getScheme()(Code) | | The scheme is "mailto:"
|
getURL | public String getURL()(Code) | | The URL looks like "mailto:user@host.com"
|
openWriteImpl | public StreamImpl openWriteImpl() throws IOException(Code) | | Implementation to open a WriteStream.
|
parseAddressList | static ArrayList<Recipient> parseAddressList(StringCharCursor cursor)(Code) | | Parses the address list from the URL.
Parameters: cursor - parse cursor for the URL a list of recipient addresses |
schemeWalk | protected Path schemeWalk(String userPath, Map<String, Object> attributes, String uri, int offset)(Code) | | Parse the scheme for the recipient and the attributes.
|
|
|