N
Nicola Trevisan
Hi,
I must send email to a server that listen in port 2025,
how I can do it using JavaMail??
Thank to all.
Nicola Trevisan
PS: I insert my code so you can tell me where to place new code.....I hope
props = System.getProperties();
props.setProperty("mail.transport.protocol", "smtp");
props.setProperty("mail.host", "127.0.0.1");
session = Session.getDefaultInstance(props);
in = new FileInputStream(file);
msg = new MimeMessage(session, in);
msg.setFrom(new InternetAddress("(e-mail address removed)"));
msg.setRecipient(Message.RecipientType.TO, new
InternetAddress("(e-mail address removed)"));
transport = session.getTransport();
transport.send(msg);
I must send email to a server that listen in port 2025,
how I can do it using JavaMail??
Thank to all.
Nicola Trevisan
PS: I insert my code so you can tell me where to place new code.....I hope
props = System.getProperties();
props.setProperty("mail.transport.protocol", "smtp");
props.setProperty("mail.host", "127.0.0.1");
session = Session.getDefaultInstance(props);
in = new FileInputStream(file);
msg = new MimeMessage(session, in);
msg.setFrom(new InternetAddress("(e-mail address removed)"));
msg.setRecipient(Message.RecipientType.TO, new
InternetAddress("(e-mail address removed)"));
transport = session.getTransport();
transport.send(msg);