Package system.net.mail
Class SmtpClient
- java.lang.Object
-
- org.mases.jcobridge.netreflection.NetObject
-
- system.net.mail.SmtpClient
-
- All Implemented Interfaces:
java.lang.AutoCloseable,IJCOBridgeReflected
public class SmtpClient extends NetObject implements java.lang.AutoCloseable
The base .NET class managing System.Net.Mail.SmtpClient, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089..NET documentation at https://docs.microsoft.com/en-us/dotnet/api/System.Net.Mail.SmtpClient
Powered by JCOBridge: more info at https://www.jcobridge.com
- Author:
- MASES s.r.l https://masesgroup.com
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringassemblyFullNameFully assembly qualified name: System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089static java.lang.StringassemblyShortNameAssembly name: Systemstatic java.lang.StringclassNameQualified class name: System.Net.Mail.SmtpClientstatic JCTypeclassTypeThe type managed from JCOBridge.
-
Constructor Summary
Constructors Constructor Description SmtpClient()SmtpClient(java.lang.Object instance)Internal constructor.SmtpClient(java.lang.String host)SmtpClient(java.lang.String host, int port)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSendCompleted(SendCompletedEventHandler handler)static SmtpClientcast(IJCOBridgeReflected from)Try to cast theIJCOBridgeReflectedinstance intoSmtpClient, a cast assert is made to check if types are compatible.voidclose()voidDispose()X509CertificateCollectiongetClientCertificates()ICredentialsByHostgetCredentials()SmtpDeliveryFormatgetDeliveryFormat()SmtpDeliveryMethodgetDeliveryMethod()booleangetEnableSsl()java.lang.StringgetHost()java.lang.StringgetJCOAssemblyName()Returns the reflected Assembly namejava.lang.StringgetJCOClassName()Returns the reflected Class namejava.lang.ObjectgetJCOInstance()Returns the instantiated classjava.lang.StringgetJCOObjectName()Returns the reflected Class name used to build the objectJCTypegetJCOType()Returns the instantiated class Typejava.lang.StringgetPickupDirectoryLocation()intgetPort()ServicePointgetServicePoint()java.lang.StringgetTargetName()intgetTimeout()booleangetUseDefaultCredentials()voidremoveSendCompleted(SendCompletedEventHandler handler)voidSend(java.lang.String from, java.lang.String recipients, java.lang.String subject, java.lang.String body)voidSend(MailMessage message)voidSendAsync(java.lang.String from, java.lang.String recipients, java.lang.String subject, java.lang.String body, NetObject userToken)voidSendAsync(MailMessage message, NetObject userToken)voidSendAsyncCancel()TaskSendMailAsync(java.lang.String from, java.lang.String recipients, java.lang.String subject, java.lang.String body)TaskSendMailAsync(MailMessage message)voidsetCredentials(ICredentialsByHost Credentials)voidsetDeliveryFormat(SmtpDeliveryFormat DeliveryFormat)voidsetDeliveryMethod(SmtpDeliveryMethod DeliveryMethod)voidsetEnableSsl(boolean EnableSsl)voidsetHost(java.lang.String Host)voidsetJCOInstance(JCObject instance)voidsetPickupDirectoryLocation(java.lang.String PickupDirectoryLocation)voidsetPort(int Port)voidsetTargetName(java.lang.String TargetName)voidsetTimeout(int Timeout)voidsetUseDefaultCredentials(boolean UseDefaultCredentials)
-
-
-
Field Detail
-
assemblyFullName
public static final java.lang.String assemblyFullName
Fully assembly qualified name: System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089- See Also:
- Constant Field Values
-
assemblyShortName
public static final java.lang.String assemblyShortName
Assembly name: System- See Also:
- Constant Field Values
-
className
public static final java.lang.String className
Qualified class name: System.Net.Mail.SmtpClient- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SmtpClient
public SmtpClient(java.lang.Object instance) throws java.lang.ThrowableInternal constructor. Use with caution- Throws:
java.lang.Throwable
-
SmtpClient
public SmtpClient() throws java.lang.Throwable, ArgumentException, ArgumentNullException, ArgumentOutOfRangeException, NotSupportedException, ConfigurationException, ConfigurationErrorsException, OverflowException, MulticastNotSupportedException, InvalidOperationException, OutOfMemoryException, CultureNotFoundException
-
SmtpClient
public SmtpClient(java.lang.String host) throws java.lang.Throwable, ArgumentException, ArgumentNullException, ArgumentOutOfRangeException, NotSupportedException, ConfigurationException, ConfigurationErrorsException, OverflowException, MulticastNotSupportedException, InvalidOperationException, OutOfMemoryException, CultureNotFoundException
-
SmtpClient
public SmtpClient(java.lang.String host, int port) throws java.lang.Throwable, ArgumentException, ArgumentNullException, ArgumentOutOfRangeException, NotSupportedException, ConfigurationException, ConfigurationErrorsException, OverflowException, MulticastNotSupportedException, InvalidOperationException, OutOfMemoryException, CultureNotFoundException
-
-
Method Detail
-
getJCOAssemblyName
public java.lang.String getJCOAssemblyName()
Description copied from interface:IJCOBridgeReflectedReturns the reflected Assembly name- Specified by:
getJCOAssemblyNamein interfaceIJCOBridgeReflected- Overrides:
getJCOAssemblyNamein classNetObject- Returns:
- A
Stringrepresenting the Fullname of reflected Assembly
-
getJCOClassName
public java.lang.String getJCOClassName()
Description copied from interface:IJCOBridgeReflectedReturns the reflected Class name- Specified by:
getJCOClassNamein interfaceIJCOBridgeReflected- Overrides:
getJCOClassNamein classNetObject- Returns:
- A
Stringrepresenting the Fullname of reflected Class
-
getJCOObjectName
public java.lang.String getJCOObjectName()
Description copied from interface:IJCOBridgeReflectedReturns the reflected Class name used to build the object- Specified by:
getJCOObjectNamein interfaceIJCOBridgeReflected- Overrides:
getJCOObjectNamein classNetObject- Returns:
- A
Stringrepresenting the name used to allocated the object in CLR context
-
getJCOInstance
public java.lang.Object getJCOInstance()
Description copied from interface:IJCOBridgeReflectedReturns the instantiated class- Specified by:
getJCOInstancein interfaceIJCOBridgeReflected- Overrides:
getJCOInstancein classNetObject- Returns:
- An
Objectrepresenting the CLR instance of the instantiated Class
-
setJCOInstance
public void setJCOInstance(JCObject instance)
- Overrides:
setJCOInstancein classNetObject
-
getJCOType
public JCType getJCOType()
Description copied from interface:IJCOBridgeReflectedReturns the instantiated class Type- Specified by:
getJCOTypein interfaceIJCOBridgeReflected- Overrides:
getJCOTypein classNetObject- Returns:
- A
JCTyperepresenting the CLR Type of the instantiated Class
-
cast
public static SmtpClient cast(IJCOBridgeReflected from) throws java.lang.Throwable
Try to cast theIJCOBridgeReflectedinstance intoSmtpClient, a cast assert is made to check if types are compatible.- Parameters:
from-IJCOBridgeReflectedinstance to be casted- Returns:
SmtpClientinstance- Throws:
java.lang.Throwable- in case of error during cast operation
-
SendMailAsync
public Task SendMailAsync(MailMessage message) throws java.lang.Throwable, ArgumentException, ArgumentNullException, InvalidOperationException, ObjectDisposedException, AbandonedMutexException, ArgumentOutOfRangeException, ConfigurationException, ConfigurationErrorsException, MissingManifestResourceException, InvalidCastException, OutOfMemoryException, NotSupportedException, NullReferenceException, AccessViolationException, FileNotFoundException, DirectoryNotFoundException, UnauthorizedAccessException, IOException, PathTooLongException, DriveNotFoundException, OperationCanceledException, SmtpException, CultureNotFoundException, SecurityException, FormatException, OverflowException, NotImplementedException, SemaphoreFullException, RankException, ApplicationException, UriFormatException, WebException
- Throws:
java.lang.ThrowableArgumentExceptionArgumentNullExceptionInvalidOperationExceptionObjectDisposedExceptionAbandonedMutexExceptionArgumentOutOfRangeExceptionConfigurationExceptionConfigurationErrorsExceptionMissingManifestResourceExceptionInvalidCastExceptionOutOfMemoryExceptionNotSupportedExceptionNullReferenceExceptionAccessViolationExceptionFileNotFoundExceptionDirectoryNotFoundExceptionUnauthorizedAccessExceptionIOExceptionPathTooLongExceptionDriveNotFoundExceptionOperationCanceledExceptionSmtpExceptionCultureNotFoundExceptionSecurityExceptionFormatExceptionOverflowExceptionNotImplementedExceptionSemaphoreFullExceptionRankExceptionApplicationExceptionUriFormatExceptionWebException
-
SendMailAsync
public Task SendMailAsync(java.lang.String from, java.lang.String recipients, java.lang.String subject, java.lang.String body) throws java.lang.Throwable, ArgumentNullException, ArgumentException, NotImplementedException, CultureNotFoundException, IndexOutOfRangeException, ArgumentOutOfRangeException, MissingManifestResourceException, ObjectDisposedException, InvalidOperationException, NotSupportedException, OutOfMemoryException, FormatException, ConfigurationException, ConfigurationErrorsException, MulticastNotSupportedException, NullReferenceException, AccessViolationException, SmtpException, SecurityException, IOException, OverflowException, ApplicationException, AbandonedMutexException, WebException
- Throws:
java.lang.ThrowableArgumentNullExceptionArgumentExceptionNotImplementedExceptionCultureNotFoundExceptionIndexOutOfRangeExceptionArgumentOutOfRangeExceptionMissingManifestResourceExceptionObjectDisposedExceptionInvalidOperationExceptionNotSupportedExceptionOutOfMemoryExceptionFormatExceptionConfigurationExceptionConfigurationErrorsExceptionMulticastNotSupportedExceptionNullReferenceExceptionAccessViolationExceptionSmtpExceptionSecurityExceptionIOExceptionOverflowExceptionApplicationExceptionAbandonedMutexExceptionWebException
-
Dispose
public void Dispose() throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, ObjectDisposedException, FileNotFoundException, DirectoryNotFoundException, UnauthorizedAccessException, IOException, PathTooLongException, DriveNotFoundException, OperationCanceledException, RankException, ApplicationException, InvalidOperationException, UriFormatException- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionArgumentNullExceptionObjectDisposedExceptionFileNotFoundExceptionDirectoryNotFoundExceptionUnauthorizedAccessExceptionIOExceptionPathTooLongExceptionDriveNotFoundExceptionOperationCanceledExceptionRankExceptionApplicationExceptionInvalidOperationExceptionUriFormatException
-
Send
public void Send(MailMessage message) throws java.lang.Throwable, ArgumentException, ArgumentNullException, ArgumentOutOfRangeException, NotSupportedException, ConfigurationException, ConfigurationErrorsException, OverflowException, MulticastNotSupportedException, InvalidOperationException, OutOfMemoryException, ObjectDisposedException, FileNotFoundException, DirectoryNotFoundException, UnauthorizedAccessException, IOException, PathTooLongException, DriveNotFoundException, OperationCanceledException, RankException, ApplicationException, SecurityException, AccessViolationException, SmtpException, UriFormatException, WaitHandleCannotBeOpenedException, AbandonedMutexException, WebException, SocketException, FormatException, NotImplementedException, SemaphoreFullException
- Throws:
java.lang.ThrowableArgumentExceptionArgumentNullExceptionArgumentOutOfRangeExceptionNotSupportedExceptionConfigurationExceptionConfigurationErrorsExceptionOverflowExceptionMulticastNotSupportedExceptionInvalidOperationExceptionOutOfMemoryExceptionObjectDisposedExceptionFileNotFoundExceptionDirectoryNotFoundExceptionUnauthorizedAccessExceptionIOExceptionPathTooLongExceptionDriveNotFoundExceptionOperationCanceledExceptionRankExceptionApplicationExceptionSecurityExceptionAccessViolationExceptionSmtpExceptionUriFormatExceptionWaitHandleCannotBeOpenedExceptionAbandonedMutexExceptionWebExceptionSocketExceptionFormatExceptionNotImplementedExceptionSemaphoreFullException
-
Send
public void Send(java.lang.String from, java.lang.String recipients, java.lang.String subject, java.lang.String body) throws java.lang.Throwable, ObjectDisposedException, ArgumentNullException, ArgumentException, NotImplementedException, CultureNotFoundException, IndexOutOfRangeException, ArgumentOutOfRangeException, MissingManifestResourceException, InvalidOperationException, NotSupportedException, OutOfMemoryException, FormatException, ConfigurationException, ConfigurationErrorsException, MulticastNotSupportedException, ApplicationException, NullReferenceException, AccessViolationException, SmtpException, SecurityException, IOException, OverflowException, AbandonedMutexException, WebException, SemaphoreFullException- Throws:
java.lang.ThrowableObjectDisposedExceptionArgumentNullExceptionArgumentExceptionNotImplementedExceptionCultureNotFoundExceptionIndexOutOfRangeExceptionArgumentOutOfRangeExceptionMissingManifestResourceExceptionInvalidOperationExceptionNotSupportedExceptionOutOfMemoryExceptionFormatExceptionConfigurationExceptionConfigurationErrorsExceptionMulticastNotSupportedExceptionApplicationExceptionNullReferenceExceptionAccessViolationExceptionSmtpExceptionSecurityExceptionIOExceptionOverflowExceptionAbandonedMutexExceptionWebExceptionSemaphoreFullException
-
SendAsync
public void SendAsync(MailMessage message, NetObject userToken) throws java.lang.Throwable, ObjectDisposedException, ArgumentException, ArgumentNullException, ArgumentOutOfRangeException, NotSupportedException, ConfigurationException, ConfigurationErrorsException, OverflowException, MulticastNotSupportedException, InvalidOperationException, OutOfMemoryException, SecurityException, AccessViolationException, FileNotFoundException, DirectoryNotFoundException, UnauthorizedAccessException, IOException, PathTooLongException, DriveNotFoundException, OperationCanceledException, SmtpException, FormatException, NotImplementedException, SemaphoreFullException, RankException, ApplicationException, SynchronizationLockException, UriFormatException, AbandonedMutexException, WebException, SocketException
- Throws:
java.lang.ThrowableObjectDisposedExceptionArgumentExceptionArgumentNullExceptionArgumentOutOfRangeExceptionNotSupportedExceptionConfigurationExceptionConfigurationErrorsExceptionOverflowExceptionMulticastNotSupportedExceptionInvalidOperationExceptionOutOfMemoryExceptionSecurityExceptionAccessViolationExceptionFileNotFoundExceptionDirectoryNotFoundExceptionUnauthorizedAccessExceptionIOExceptionPathTooLongExceptionDriveNotFoundExceptionOperationCanceledExceptionSmtpExceptionFormatExceptionNotImplementedExceptionSemaphoreFullExceptionRankExceptionApplicationExceptionSynchronizationLockExceptionUriFormatExceptionAbandonedMutexExceptionWebExceptionSocketException
-
SendAsync
public void SendAsync(java.lang.String from, java.lang.String recipients, java.lang.String subject, java.lang.String body, NetObject userToken) throws java.lang.Throwable, ObjectDisposedException, ArgumentNullException, ArgumentException, NotImplementedException, CultureNotFoundException, IndexOutOfRangeException, ArgumentOutOfRangeException, MissingManifestResourceException, InvalidOperationException, NotSupportedException, OutOfMemoryException, FormatException, ConfigurationException, ConfigurationErrorsException, MulticastNotSupportedException, NullReferenceException, AccessViolationException, FileNotFoundException, DirectoryNotFoundException, UnauthorizedAccessException, IOException, PathTooLongException, DriveNotFoundException, OperationCanceledException, SmtpException, SecurityException, OverflowException, SemaphoreFullException, RankException, ApplicationException, UriFormatException, AbandonedMutexException, WebException- Throws:
java.lang.ThrowableObjectDisposedExceptionArgumentNullExceptionArgumentExceptionNotImplementedExceptionCultureNotFoundExceptionIndexOutOfRangeExceptionArgumentOutOfRangeExceptionMissingManifestResourceExceptionInvalidOperationExceptionNotSupportedExceptionOutOfMemoryExceptionFormatExceptionConfigurationExceptionConfigurationErrorsExceptionMulticastNotSupportedExceptionNullReferenceExceptionAccessViolationExceptionFileNotFoundExceptionDirectoryNotFoundExceptionUnauthorizedAccessExceptionIOExceptionPathTooLongExceptionDriveNotFoundExceptionOperationCanceledExceptionSmtpExceptionSecurityExceptionOverflowExceptionSemaphoreFullExceptionRankExceptionApplicationExceptionUriFormatExceptionAbandonedMutexExceptionWebException
-
SendAsyncCancel
public void SendAsyncCancel() throws java.lang.Throwable, ObjectDisposedException, ArgumentException, ArgumentNullException, ArgumentOutOfRangeException, NotSupportedException, ConfigurationException, ConfigurationErrorsException, OverflowException, MulticastNotSupportedException, InvalidOperationException, OutOfMemoryException, FileNotFoundException, DirectoryNotFoundException, UnauthorizedAccessException, IOException, PathTooLongException, DriveNotFoundException, OperationCanceledException, RankException, AbandonedMutexException, ApplicationException- Throws:
java.lang.ThrowableObjectDisposedExceptionArgumentExceptionArgumentNullExceptionArgumentOutOfRangeExceptionNotSupportedExceptionConfigurationExceptionConfigurationErrorsExceptionOverflowExceptionMulticastNotSupportedExceptionInvalidOperationExceptionOutOfMemoryExceptionFileNotFoundExceptionDirectoryNotFoundExceptionUnauthorizedAccessExceptionIOExceptionPathTooLongExceptionDriveNotFoundExceptionOperationCanceledExceptionRankExceptionAbandonedMutexExceptionApplicationException
-
close
public void close() throws java.lang.Exception- Specified by:
closein interfacejava.lang.AutoCloseable- Throws:
java.lang.Exception
-
getEnableSsl
public boolean getEnableSsl() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
setEnableSsl
public void setEnableSsl(boolean EnableSsl) throws java.lang.Throwable- Throws:
java.lang.Throwable
-
getUseDefaultCredentials
public boolean getUseDefaultCredentials() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
setUseDefaultCredentials
public void setUseDefaultCredentials(boolean UseDefaultCredentials) throws java.lang.Throwable, ArgumentNullException, ArgumentException, InvalidOperationException, MissingMethodException, TargetInvocationException, NotImplementedException, NotSupportedException, ArgumentOutOfRangeException, CultureNotFoundException, MissingManifestResourceException, ObjectDisposedException, NullReferenceException- Throws:
java.lang.ThrowableArgumentNullExceptionArgumentExceptionInvalidOperationExceptionMissingMethodExceptionTargetInvocationExceptionNotImplementedExceptionNotSupportedExceptionArgumentOutOfRangeExceptionCultureNotFoundExceptionMissingManifestResourceExceptionObjectDisposedExceptionNullReferenceException
-
getPort
public int getPort() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
setPort
public void setPort(int Port) throws java.lang.Throwable, ArgumentNullException, ArgumentException, InvalidOperationException, MissingMethodException, TargetInvocationException, NotImplementedException, NotSupportedException, ArgumentOutOfRangeException, CultureNotFoundException, MissingManifestResourceException, ObjectDisposedException
-
getTimeout
public int getTimeout() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
setTimeout
public void setTimeout(int Timeout) throws java.lang.Throwable, ArgumentNullException, ArgumentException, InvalidOperationException, MissingMethodException, TargetInvocationException, NotImplementedException, NotSupportedException, ArgumentOutOfRangeException, CultureNotFoundException, MissingManifestResourceException, ObjectDisposedException
-
getCredentials
public ICredentialsByHost getCredentials() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
setCredentials
public void setCredentials(ICredentialsByHost Credentials) throws java.lang.Throwable, ArgumentNullException, ArgumentException, InvalidOperationException, MissingMethodException, TargetInvocationException, NotImplementedException, NotSupportedException, ArgumentOutOfRangeException, CultureNotFoundException, MissingManifestResourceException, ObjectDisposedException
-
getDeliveryFormat
public SmtpDeliveryFormat getDeliveryFormat() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
setDeliveryFormat
public void setDeliveryFormat(SmtpDeliveryFormat DeliveryFormat) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
getDeliveryMethod
public SmtpDeliveryMethod getDeliveryMethod() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
setDeliveryMethod
public void setDeliveryMethod(SmtpDeliveryMethod DeliveryMethod) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
getServicePoint
public ServicePoint getServicePoint() throws java.lang.Throwable, ArgumentNullException, ArgumentException, InvalidOperationException, MissingMethodException, TargetInvocationException, NotImplementedException, ArgumentOutOfRangeException, CultureNotFoundException, MissingManifestResourceException, ObjectDisposedException, IndexOutOfRangeException, NotSupportedException, ConfigurationException, ConfigurationErrorsException, MulticastNotSupportedException, OutOfMemoryException, InvalidTimeZoneException, FormatException
- Throws:
java.lang.ThrowableArgumentNullExceptionArgumentExceptionInvalidOperationExceptionMissingMethodExceptionTargetInvocationExceptionNotImplementedExceptionArgumentOutOfRangeExceptionCultureNotFoundExceptionMissingManifestResourceExceptionObjectDisposedExceptionIndexOutOfRangeExceptionNotSupportedExceptionConfigurationExceptionConfigurationErrorsExceptionMulticastNotSupportedExceptionOutOfMemoryExceptionInvalidTimeZoneExceptionFormatException
-
getClientCertificates
public X509CertificateCollection getClientCertificates() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
getHost
public java.lang.String getHost() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
setHost
public void setHost(java.lang.String Host) throws java.lang.Throwable, ArgumentNullException, ArgumentException, InvalidOperationException, MissingMethodException, TargetInvocationException, NotImplementedException, NotSupportedException, ArgumentOutOfRangeException, CultureNotFoundException, MissingManifestResourceException, ObjectDisposedException
-
getPickupDirectoryLocation
public java.lang.String getPickupDirectoryLocation() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
setPickupDirectoryLocation
public void setPickupDirectoryLocation(java.lang.String PickupDirectoryLocation) throws java.lang.Throwable- Throws:
java.lang.Throwable
-
getTargetName
public java.lang.String getTargetName() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
setTargetName
public void setTargetName(java.lang.String TargetName) throws java.lang.Throwable- Throws:
java.lang.Throwable
-
addSendCompleted
public void addSendCompleted(SendCompletedEventHandler handler) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
removeSendCompleted
public void removeSendCompleted(SendCompletedEventHandler handler) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
-