If you think there is no need to set the Mail server, and use JavaMail's mail to send features, the best way is to use your own free email server! These servers must be verified to log in, so JavaMail programming with authentication is required! Description: 1. Download JavaMail.jar and Jaf Frame (handling multiple formats) 2. Use the mail server (requires authentication) 3.Sndecard.java sends Mail_ca with an attachment) with your existing free mailbox. java authentication javabeanpackage netcard; / *** SendEcard.java * send mail of javabean * / import java.util.Properties; import java.util.Date; import javax.mail *;. import javax.mail.internet *. ; import javax.activation *;. public class SendEcard {private String tomail; private String frommail; private String subject; private String content; private String imagecard; String smtp = "****"; // set the mail server public SendEcard ( ) {} public String getTomail () {return tomail;} public void setTomail (String tomail) {this.tomail = tomail;} public String getFrommail () {return frommail;} public void setFrommail (String frommail) {this.frommail = frommail;} public String getSubject () {return subject;} public void setSubject (String subject) {this.subject = subject;} public String getContent () {return content;} public void setContent (String content) {this.content = conte nt;} public String getImagecard () {return imagecard;} public void setImagecard (String imagecard) {this.imagecard = imagecard;} public boolean sendMail () {try {Properties p = System.getProperties (); p.put ( " Mail.smtp.host ", this.smtp); P.PUT (" mail.smtp.auth "," true "); // Setting to verify the mode session session = session.getDefaultInstance (p, new email_ca (" User name "," password ")); mimeMessage msg = new mimeMessage (session); msg.setSentDate (new date ());