Whats the difference between the Transport methods send and sendMessage?
send() method is a static method and can be used without needing an instance of a Transport object. It is intended for the common, simple case of sending a single message using the default transport. Internally, the send() method will first call the saveChanges() method on the message. It will then create an appropriate new Transport object, call the Transport’s connect() method, call the Transport’s sendMessage() method to actually send the message, call the Transport’s close() method, and finally abandon the new instance of the Transport object to be collected by the garbage collector. (Actually, it’s rather more complicated than that, but that’s the general idea.
send() method is a static method and can be used without needing an instance of a Transport object. It is intended for the common, simple case of sending a single message using the default transport. Internally, the send() method will first call the saveChanges() method on the message. It will then create an appropriate new Transport object, call the Transport’s connect() method, call the Transport’s sendMessage() method to actually send the message, call the Transport’s close() method, and finally abandon the new instance of the Transport object to be collected by the garbage collector.