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.Net.Mail, Version=10.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51..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.Net.Mail, Version=10.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51static java.lang.StringassemblyShortNameAssembly name: System.Net.Mailstatic java.lang.StringclassNameQualified class name: System.Net.Mail.SmtpClientstatic org.mases.jcobridge.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 objectorg.mases.jcobridge.JCTypegetJCOType()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(java.lang.String from, java.lang.String recipients, java.lang.String subject, java.lang.String body, CancellationToken cancellationToken)TaskSendMailAsync(MailMessage message)TaskSendMailAsync(MailMessage message, CancellationToken cancellationToken)voidsetCredentials(ICredentialsByHost Credentials)voidsetDeliveryFormat(SmtpDeliveryFormat DeliveryFormat)voidsetDeliveryMethod(SmtpDeliveryMethod DeliveryMethod)voidsetEnableSsl(boolean EnableSsl)voidsetHost(java.lang.String Host)voidsetJCOInstance(org.mases.jcobridge.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.Net.Mail, Version=10.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51- See Also:
- Constant Field Values
-
assemblyShortName
public static final java.lang.String assemblyShortName
Assembly name: System.Net.Mail- 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
-
classType
public static org.mases.jcobridge.JCType classType
The type managed from JCOBridge. SeeJCType
-
-
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, NotSupportedException, ArgumentException, PlatformNotSupportedException, OutOfMemoryException, EventSourceException, ArgumentOutOfRangeException, InvalidOperationException, CultureNotFoundException
-
SmtpClient
public SmtpClient(java.lang.String host, int port) throws java.lang.Throwable, ArgumentException, ArgumentNullException, PlatformNotSupportedException, ArgumentOutOfRangeException, InvalidOperationException, ArrayTypeMismatchException, NotSupportedException, ObjectDisposedException, RankException, IndexOutOfRangeException, OutOfMemoryException, EventSourceException- Throws:
java.lang.ThrowableArgumentExceptionArgumentNullExceptionPlatformNotSupportedExceptionArgumentOutOfRangeExceptionInvalidOperationExceptionArrayTypeMismatchExceptionNotSupportedExceptionObjectDisposedExceptionRankExceptionIndexOutOfRangeExceptionOutOfMemoryExceptionEventSourceException
-
SmtpClient
public SmtpClient(java.lang.String host) throws java.lang.Throwable, NotSupportedException, ArgumentException, PlatformNotSupportedException, OutOfMemoryException, EventSourceException, ArgumentOutOfRangeException, InvalidOperationException, 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(org.mases.jcobridge.JCObject instance)
- Overrides:
setJCOInstancein classNetObject
-
getJCOType
public org.mases.jcobridge.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, CancellationToken cancellationToken) throws java.lang.Throwable, ArgumentException, ArgumentNullException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, EventSourceException, TaskSchedulerException, ThreadStateException, OperationCanceledException, TaskCanceledException, AggregateException
- Throws:
java.lang.ThrowableArgumentExceptionArgumentNullExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionNotSupportedExceptionObjectDisposedExceptionInvalidOperationExceptionRankExceptionArrayTypeMismatchExceptionEventSourceExceptionTaskSchedulerExceptionThreadStateExceptionOperationCanceledExceptionTaskCanceledExceptionAggregateException
-
SendMailAsync
public Task SendMailAsync(MailMessage message) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException, PlatformNotSupportedException, EventSourceException, TaskSchedulerException, TaskCanceledException, AggregateException, NullReferenceException
-
SendMailAsync
public Task SendMailAsync(java.lang.String from, java.lang.String recipients, java.lang.String subject, java.lang.String body, CancellationToken cancellationToken) throws java.lang.Throwable, ArgumentNullException, ArgumentException, NotSupportedException, ArgumentOutOfRangeException, FormatException, PlatformNotSupportedException, IndexOutOfRangeException, OutOfMemoryException, EventSourceException, InvalidOperationException, ArrayTypeMismatchException, TaskSchedulerException, TaskCanceledException, AggregateException, NullReferenceException
- Throws:
java.lang.ThrowableArgumentNullExceptionArgumentExceptionNotSupportedExceptionArgumentOutOfRangeExceptionFormatExceptionPlatformNotSupportedExceptionIndexOutOfRangeExceptionOutOfMemoryExceptionEventSourceExceptionInvalidOperationExceptionArrayTypeMismatchExceptionTaskSchedulerExceptionTaskCanceledExceptionAggregateExceptionNullReferenceException
-
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, NotSupportedException, ArgumentOutOfRangeException, FormatException, PlatformNotSupportedException, IndexOutOfRangeException, OutOfMemoryException, EventSourceException, InvalidOperationException, ArrayTypeMismatchException, TaskSchedulerException, TaskCanceledException, AggregateException, NullReferenceException
- Throws:
java.lang.ThrowableArgumentNullExceptionArgumentExceptionNotSupportedExceptionArgumentOutOfRangeExceptionFormatExceptionPlatformNotSupportedExceptionIndexOutOfRangeExceptionOutOfMemoryExceptionEventSourceExceptionInvalidOperationExceptionArrayTypeMismatchExceptionTaskSchedulerExceptionTaskCanceledExceptionAggregateExceptionNullReferenceException
-
Dispose
public void Dispose() throws java.lang.Throwable, ObjectDisposedException, PlatformNotSupportedException, NullReferenceException, NotSupportedException, ArgumentNullException, ArgumentException, AggregateException, TaskCanceledException
-
Send
public void Send(MailMessage message) throws java.lang.Throwable, NotSupportedException, ArgumentException, ArgumentNullException, PlatformNotSupportedException, EventSourceException, InvalidOperationException, TaskSchedulerException, ThreadStateException, ObjectDisposedException, OperationCanceledException, TaskCanceledException, ArgumentOutOfRangeException, AggregateException
- Throws:
java.lang.ThrowableNotSupportedExceptionArgumentExceptionArgumentNullExceptionPlatformNotSupportedExceptionEventSourceExceptionInvalidOperationExceptionTaskSchedulerExceptionThreadStateExceptionObjectDisposedExceptionOperationCanceledExceptionTaskCanceledExceptionArgumentOutOfRangeExceptionAggregateException
-
Send
public void Send(java.lang.String from, java.lang.String recipients, java.lang.String subject, java.lang.String body) throws java.lang.Throwable, PlatformNotSupportedException, ObjectDisposedException, ArgumentNullException, ArgumentException, NotSupportedException, ArgumentOutOfRangeException, FormatException, IndexOutOfRangeException, OutOfMemoryException, EventSourceException, InvalidOperationException, ArrayTypeMismatchException, TaskSchedulerException, TaskCanceledException, AggregateException- Throws:
java.lang.ThrowablePlatformNotSupportedExceptionObjectDisposedExceptionArgumentNullExceptionArgumentExceptionNotSupportedExceptionArgumentOutOfRangeExceptionFormatExceptionIndexOutOfRangeExceptionOutOfMemoryExceptionEventSourceExceptionInvalidOperationExceptionArrayTypeMismatchExceptionTaskSchedulerExceptionTaskCanceledExceptionAggregateException
-
SendAsync
public void SendAsync(MailMessage message, NetObject userToken) throws java.lang.Throwable, NotSupportedException, ArgumentException, ArgumentNullException, PlatformNotSupportedException, EventSourceException, InvalidOperationException, TaskSchedulerException, ThreadStateException, ObjectDisposedException, OperationCanceledException, TaskCanceledException, ArgumentOutOfRangeException, AggregateException
- Throws:
java.lang.ThrowableNotSupportedExceptionArgumentExceptionArgumentNullExceptionPlatformNotSupportedExceptionEventSourceExceptionInvalidOperationExceptionTaskSchedulerExceptionThreadStateExceptionObjectDisposedExceptionOperationCanceledExceptionTaskCanceledExceptionArgumentOutOfRangeExceptionAggregateException
-
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, PlatformNotSupportedException, ObjectDisposedException, ArgumentNullException, ArgumentException, NotSupportedException, ArgumentOutOfRangeException, FormatException, IndexOutOfRangeException, OutOfMemoryException, EventSourceException, InvalidOperationException, ArrayTypeMismatchException, TaskSchedulerException, TaskCanceledException, AggregateException- Throws:
java.lang.ThrowablePlatformNotSupportedExceptionObjectDisposedExceptionArgumentNullExceptionArgumentExceptionNotSupportedExceptionArgumentOutOfRangeExceptionFormatExceptionIndexOutOfRangeExceptionOutOfMemoryExceptionEventSourceExceptionInvalidOperationExceptionArrayTypeMismatchExceptionTaskSchedulerExceptionTaskCanceledExceptionAggregateException
-
SendAsyncCancel
public void SendAsyncCancel() throws java.lang.Throwable, PlatformNotSupportedException, ObjectDisposedException, NullReferenceException, NotSupportedException, ArgumentOutOfRangeException, ArgumentNullException, ArgumentException, AggregateException
-
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, PlatformNotSupportedException, NotSupportedException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException, InvalidOperationException
-
getPort
public int getPort() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
setPort
public void setPort(int Port) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, NotSupportedException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException, InvalidOperationException
-
getTimeout
public int getTimeout() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
setTimeout
public void setTimeout(int Timeout) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, NotSupportedException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException, InvalidOperationException
-
getCredentials
public ICredentialsByHost getCredentials() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
setCredentials
public void setCredentials(ICredentialsByHost Credentials) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, NotSupportedException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException, InvalidOperationException
-
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, PlatformNotSupportedException, NotSupportedException, ArgumentOutOfRangeException, CultureNotFoundException, InvalidOperationException, ObjectDisposedException, OverflowException, IndexOutOfRangeException, FormatException, OutOfMemoryException, ExternalException, UnreachableException, UriFormatException, InvalidTimeZoneException, RankException, ArrayTypeMismatchException, InvalidCastException
- Throws:
java.lang.ThrowableArgumentNullExceptionArgumentExceptionPlatformNotSupportedExceptionNotSupportedExceptionArgumentOutOfRangeExceptionCultureNotFoundExceptionInvalidOperationExceptionObjectDisposedExceptionOverflowExceptionIndexOutOfRangeExceptionFormatExceptionOutOfMemoryExceptionExternalExceptionUnreachableExceptionUriFormatExceptionInvalidTimeZoneExceptionRankExceptionArrayTypeMismatchExceptionInvalidCastException
-
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, PlatformNotSupportedException, NotSupportedException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException, InvalidOperationException, IndexOutOfRangeException
-
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
-
-