- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- javax.mail.MessagingException
-
- javax.mail.SendFailedException
-
- All Implemented Interfaces:
- Serializable
public class SendFailedException extends MessagingException
This exception is thrown when the message cannot be sent.The exception includes those addresses to which the message could not be sent as well as the valid addresses to which the message was sent and valid addresses to which the message was not sent.
- Author:
- John Mani, Max Spivak
- See Also:
Transport.send(javax.mail.Message)
,Transport.sendMessage(javax.mail.Message, javax.mail.Address[])
,TransportEvent
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description protected Address[]
invalid
protected Address[]
validSent
protected Address[]
validUnsent
-
Constructor Summary
Constructors Constructor and Description SendFailedException()
Constructs a SendFailedException with no detail message.SendFailedException(String s)
Constructs a SendFailedException with the specified detail message.SendFailedException(String s, Exception e)
Constructs a SendFailedException with the specified Exception and detail message.SendFailedException(String msg, Exception ex, Address[] validSent, Address[] validUnsent, Address[] invalid)
Constructs a SendFailedException with the specified string and the specified address objects.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description Address[]
getInvalidAddresses()
Return the addresses to which this message could not be sent.Address[]
getValidSentAddresses()
Return the addresses to which this message was sent succesfully.Address[]
getValidUnsentAddresses()
Return the addresses that are valid but to which this message was not sent.-
Methods inherited from class javax.mail.MessagingException
getCause, getNextException, setNextException, toString
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
-
-
-
Field Detail
-
invalid
protected transient Address[] invalid
-
validSent
protected transient Address[] validSent
-
validUnsent
protected transient Address[] validUnsent
-
-
Constructor Detail
-
SendFailedException
public SendFailedException()
Constructs a SendFailedException with no detail message.
-
SendFailedException
public SendFailedException(String s)
Constructs a SendFailedException with the specified detail message.- Parameters:
s
- the detail message
-
SendFailedException
public SendFailedException(String s, Exception e)
Constructs a SendFailedException with the specified Exception and detail message. The specified exception is chained to this exception.- Parameters:
s
- the detail messagee
- the embedded exception- See Also:
MessagingException.getNextException()
,MessagingException.setNextException(java.lang.Exception)
-
SendFailedException
public SendFailedException(String msg, Exception ex, Address[] validSent, Address[] validUnsent, Address[] invalid)
Constructs a SendFailedException with the specified string and the specified address objects.- Parameters:
msg
- the detail messageex
- the embedded exceptionvalidSent
- valid addresses to which message was sentvalidUnsent
- valid addresses to which message was not sentinvalid
- the invalid addresses- See Also:
MessagingException.getNextException()
,MessagingException.setNextException(java.lang.Exception)
-
-
Method Detail
-
getValidSentAddresses
public Address[] getValidSentAddresses()
Return the addresses to which this message was sent succesfully.- Returns:
- Addresses to which the message was sent successfully or null
-
getValidUnsentAddresses
public Address[] getValidUnsentAddresses()
Return the addresses that are valid but to which this message was not sent.- Returns:
- Addresses that are valid but to which the message was not sent successfully or null
-
getInvalidAddresses
public Address[] getInvalidAddresses()
Return the addresses to which this message could not be sent.- Returns:
- Addresses to which the message sending failed or null;
-
-
Nederlandse vertaling
U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.
Bij voorbaat dank.
Document heeft de 11/06/2005 gemaakt, de laatste keer de 18/08/2025 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/java-api-javaee-rf-javax/mail/sendfailedexception.html
De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.
Referenties
Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur van deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.