Hitachi

Hitachi Application Server V10 Definition Reference Guide (For UNIX® Systems)


6.2.9 mail.smtp.writetimeout

mail.smtp.writetimeout specifies the socket write time-out value in milliseconds.

Description

mail.smtp.writetimeout specifies the socket write time-out value in milliseconds. This time-out is implemented using java.util.concurrent.ScheduledExecutorService per connection, which schedules a thread to close the socket if the time-out expires. Thus, the overhead of using mail.smtp.writetimeout is one thread per connection. The default value is -1. If the time-out value is 0 or the default value, then it is interpreted as an infinite time-out.

Specifiable values

Type: Integer

-1 to 2147483647

Default value

If the definition item is omitted

-1

Example

Properties properties = new Properties();
properties.setProperty("mail.smtp.writetimeout", "30");
Session session = Session.getDefaultInstance(properties);
Message message = new MimeMessage(session);
message.setSubject(sentDate);
Transport.send(message);