
Explain about URL and HTTPS protocol
1. Resolve a relative URL 2. File size from URL 3. Use the HTTPS protocol For Applets, both IE and NN have implemented https in […]
1. Resolve a relative URL 2. File size from URL 3. Use the HTTPS protocol For Applets, both IE and NN have implemented https in […]
1. Write/Read cookies using HTTP 2. Read a file from the internet 3. Read a GIF or CLASS from an URL save it locally This […]
1. Identify yourself using HTTP Authentification A better alternative is the Authenticator class. NOTE: a simple explanation about the base64 encoding principle is shown in […]
1. The Networking Properties You have to set the following properties: NOTE: proxyHost, proxyPort are deprecated. you have to prefix them with “http.”.NOTE: Those properties are documented here: http://java.sun.com/javase/6/docs/technotes/guides/net/properties.htm. […]
1. Check if a file was modified on the server 2. Check if a page exists The following is doing the same thing but this […]
Take this example. The above snippet reads the HTML page and dumps it to the console. To trace what is going on at the HTTP […]
The read receipt (i.e. “Disposition-Notification-To” SMTP header) is a request for the receiving email client to send a DSN (delivery status notification) as soon as the […]
POP3 supports simple download-and-delete requirements for access to remote mailboxes. Java Mail comes with Provider implementations for POP3 and IMAP, and the secure versions of those […]
IMAP presents mail messages as entries in a hierarchy of folders, one of which will be an inbox. Java Mail comes with Provider implementations for POP3 […]
1. Loading an .EML file When saving an email to a file, the resulting file has an eml extension (email files–which are in RFC 822 […]
When Outlook Express saves an email, it uses the EML format which is a good thing because the format is a standard. But Outlook (not […]
Done! Happy Coding!
1. Send email with SMTPS It’s not uncommon that the outgoing mail needs to be encrypted using the SMTPS protocol. It’s the case for GMail […]
1. JavaMail Debug mode To set the JavaMail Debug mode “on” : or set the property when launching the JVM: This setting puts the JavaMail […]
NOTE: The JavaMail Authenticator is found in the javax.mail package and is different from the java.net class of the same name. The two don’t share […]
Simple email: HTML Email: Email with attachment: Done! Happy Coding!
In this example, Elvis is sending a GIF of his old Gumby friend. The attachment is encoded using the BASE64 algorithm. In this example, we […]
Done! Happy Coding!
Exam code: Done! Happy Coding!
SMTP is the protocol used to send an email. Done! Happy Coding!