Package totalcross.net.mail
Class Transport
- java.lang.Object
-
- totalcross.net.mail.Service
-
- totalcross.net.mail.Transport
-
- Direct Known Subclasses:
SMTPTransport
public abstract class Transport extends Service
An abstract class that models a message transport. Subclasses provide actual implementations.- Since:
- TotalCross 1.13
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedTransport(MailSession session)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static voidsend(Message message)Send a message.static voidsend(Message message, MailSession session)Send a message.abstract voidsendMessage(Message message)-
Methods inherited from class totalcross.net.mail.Service
close, connect, connect, protocolConnect
-
-
-
-
Constructor Detail
-
Transport
protected Transport(MailSession session)
-
-
Method Detail
-
send
public static void send(Message message) throws MessagingException, AuthenticationException
Send a message. The message will be sent to all recipient addresses specified in the message, using message transports appropriate to each address, as specified on the static instance of MailSession. NOTE: Only SMTP transport is currently supported.- Parameters:
message- the message to send- Throws:
MessagingExceptionAuthenticationException- Since:
- TotalCross 1.13
-
send
public static void send(Message message, MailSession session) throws MessagingException, AuthenticationException
Send a message. The message will be sent to all recipient addresses specified in the message, using message transports appropriate to each address, as specified on the given instance of MailSession. NOTE: Only SMTP transport is currently supported.- Parameters:
message- the message to sendsession- the MailSession to be used- Throws:
MessagingExceptionAuthenticationException- Since:
- TotalCross 1.13
-
sendMessage
public abstract void sendMessage(Message message) throws MessagingException
- Throws:
MessagingException
-
-