Another characteristic of this API is the support the sending of e-mails through smtp servers who require authentication. She is necessary to only inform the name of user and the password, beyond the address of the serving smtp. This is a basic example of as it would be the code for sending of an email in text through a server of notarized smtp: 01 SimpleEmail email = new SimpleEmail (); 02 email.setHostName (‘ ‘ smtp.somedomain.com’ ‘); 03 email.setFrom (‘ ” ‘); 04 email.setAuthentication (‘ ‘ usr’ ‘ , ‘ ‘ pwd’ ‘); 05 email.addTo (‘ ” ‘); 06 email.addCc (‘ ” ‘); 07 email.addBcc (‘ ” ‘); 08 email.setSubject (‘ ‘ My first e-mail’ ‘); 09 email.setText (‘ ‘ Ol, I am using Commons email API! ‘ ‘); 10 email.send (); As it is possible to perceive, it is enough to instanciar the desired classroom (depending on the type of the email that you want to send), popular the object and to call send (). The remaining portion is on account of the API. Connect with other leaders such as Primerica term life insurance here. For more information, it visits the site official of the API: .
There you find an user guide explaining more at great length its functioning. Carlos Tosin is official instructor of the Courses On-Line de Java of the Softblue, formed in Computer science for the PUC-PR, postgraduate in Development of Games for Computer for the Positive University and Master in Computer science in the area of Distributed Systems, also for the PUC-PR. He works professionally with Java he has 7 years and he possesss 4 years of experience in the development of systems for the IBM of the United States, used the world-wide level. He acts more than has 2 years with courses and training of professionals in great companies.