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=8.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.String
assemblyFullName
Fully assembly qualified name: System.Net.Mail, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51static java.lang.String
assemblyShortName
Assembly name: System.Net.Mailstatic java.lang.String
className
Qualified class name: System.Net.Mail.SmtpClientstatic JCType
classType
The 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 void
addSendCompleted(SendCompletedEventHandler handler)
static SmtpClient
cast(IJCOBridgeReflected from)
Try to cast theIJCOBridgeReflected
instance intoSmtpClient
, a cast assert is made to check if types are compatible.void
close()
void
Dispose()
X509CertificateCollection
getClientCertificates()
ICredentialsByHost
getCredentials()
SmtpDeliveryFormat
getDeliveryFormat()
SmtpDeliveryMethod
getDeliveryMethod()
boolean
getEnableSsl()
java.lang.String
getHost()
java.lang.String
getJCOAssemblyName()
Returns the reflected Assembly namejava.lang.String
getJCOClassName()
Returns the reflected Class namejava.lang.Object
getJCOInstance()
Returns the instantiated classjava.lang.String
getJCOObjectName()
Returns the reflected Class name used to build the objectJCType
getJCOType()
Returns the instantiated class Typejava.lang.String
getPickupDirectoryLocation()
int
getPort()
ServicePoint
getServicePoint()
java.lang.String
getTargetName()
int
getTimeout()
boolean
getUseDefaultCredentials()
void
removeSendCompleted(SendCompletedEventHandler handler)
void
Send(java.lang.String from, java.lang.String recipients, java.lang.String subject, java.lang.String body)
void
Send(MailMessage message)
void
SendAsync(java.lang.String from, java.lang.String recipients, java.lang.String subject, java.lang.String body, NetObject userToken)
void
SendAsync(MailMessage message, NetObject userToken)
void
SendAsyncCancel()
Task
SendMailAsync(java.lang.String from, java.lang.String recipients, java.lang.String subject, java.lang.String body)
Task
SendMailAsync(java.lang.String from, java.lang.String recipients, java.lang.String subject, java.lang.String body, CancellationToken cancellationToken)
Task
SendMailAsync(MailMessage message)
Task
SendMailAsync(MailMessage message, CancellationToken cancellationToken)
void
setCredentials(ICredentialsByHost Credentials)
void
setDeliveryFormat(SmtpDeliveryFormat DeliveryFormat)
void
setDeliveryMethod(SmtpDeliveryMethod DeliveryMethod)
void
setEnableSsl(boolean EnableSsl)
void
setHost(java.lang.String Host)
void
setJCOInstance(JCObject instance)
void
setPickupDirectoryLocation(java.lang.String PickupDirectoryLocation)
void
setPort(int Port)
void
setTargetName(java.lang.String TargetName)
void
setTimeout(int Timeout)
void
setUseDefaultCredentials(boolean UseDefaultCredentials)
-
-
-
Field Detail
-
assemblyFullName
public static final java.lang.String assemblyFullName
Fully assembly qualified name: System.Net.Mail, Version=8.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
-
-
Constructor Detail
-
SmtpClient
public SmtpClient(java.lang.Object instance) throws java.lang.Throwable
Internal constructor. Use with caution- Throws:
java.lang.Throwable
-
SmtpClient
public SmtpClient() throws java.lang.Throwable, NotSupportedException, ArgumentException, PlatformNotSupportedException, IndexOutOfRangeException, OutOfMemoryException, InvalidOperationException, EventSourceException, ArgumentOutOfRangeException, CultureNotFoundException
-
SmtpClient
public SmtpClient(java.lang.String host, int port) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, ObjectDisposedException, RankException, IndexOutOfRangeException, OutOfMemoryException, EventSourceException
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
ArgumentNullException
InvalidOperationException
PlatformNotSupportedException
ArrayTypeMismatchException
NotSupportedException
ObjectDisposedException
RankException
IndexOutOfRangeException
OutOfMemoryException
EventSourceException
-
SmtpClient
public SmtpClient(java.lang.String host) throws java.lang.Throwable, NotSupportedException, ArgumentException, PlatformNotSupportedException, IndexOutOfRangeException, OutOfMemoryException, InvalidOperationException, EventSourceException, ArgumentOutOfRangeException, CultureNotFoundException
-
-
Method Detail
-
getJCOAssemblyName
public java.lang.String getJCOAssemblyName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Assembly name- Specified by:
getJCOAssemblyName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOAssemblyName
in classNetObject
- Returns:
- A
String
representing the Fullname of reflected Assembly
-
getJCOClassName
public java.lang.String getJCOClassName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Class name- Specified by:
getJCOClassName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOClassName
in classNetObject
- Returns:
- A
String
representing the Fullname of reflected Class
-
getJCOObjectName
public java.lang.String getJCOObjectName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Class name used to build the object- Specified by:
getJCOObjectName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOObjectName
in classNetObject
- Returns:
- A
String
representing the name used to allocated the object in CLR context
-
getJCOInstance
public java.lang.Object getJCOInstance()
Description copied from interface:IJCOBridgeReflected
Returns the instantiated class- Specified by:
getJCOInstance
in interfaceIJCOBridgeReflected
- Overrides:
getJCOInstance
in classNetObject
- Returns:
- An
Object
representing the CLR instance of the instantiated Class
-
setJCOInstance
public void setJCOInstance(JCObject instance)
- Overrides:
setJCOInstance
in classNetObject
-
getJCOType
public JCType getJCOType()
Description copied from interface:IJCOBridgeReflected
Returns the instantiated class Type- Specified by:
getJCOType
in interfaceIJCOBridgeReflected
- Overrides:
getJCOType
in classNetObject
- Returns:
- A
JCType
representing the CLR Type of the instantiated Class
-
cast
public static SmtpClient cast(IJCOBridgeReflected from) throws java.lang.Throwable
Try to cast theIJCOBridgeReflected
instance intoSmtpClient
, a cast assert is made to check if types are compatible.- Parameters:
from
-IJCOBridgeReflected
instance to be casted- Returns:
SmtpClient
instance- Throws:
java.lang.Throwable
- in case of error during cast operation
-
SendMailAsync
public Task SendMailAsync(MailMessage message, CancellationToken cancellationToken) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, IndexOutOfRangeException, MulticastNotSupportedException, SmtpException, OutOfMemoryException, FormatException, CultureNotFoundException, SerializationException, UnreachableException, OverflowException, NotImplementedException, AbandonedMutexException, SocketException, SecurityException, TaskSchedulerException
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
ArgumentNullException
IndexOutOfRangeException
MulticastNotSupportedException
SmtpException
OutOfMemoryException
FormatException
CultureNotFoundException
SerializationException
UnreachableException
OverflowException
NotImplementedException
AbandonedMutexException
SocketException
SecurityException
TaskSchedulerException
-
SendMailAsync
public Task SendMailAsync(MailMessage message) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, PlatformNotSupportedException, ArgumentNullException, IndexOutOfRangeException, MulticastNotSupportedException, ObjectDisposedException, SmtpException, OutOfMemoryException, FormatException, OverflowException, NotImplementedException, ArrayTypeMismatchException, SocketException, SecurityException
- Throws:
java.lang.Throwable
ArgumentException
NotSupportedException
InvalidOperationException
ArgumentOutOfRangeException
PlatformNotSupportedException
ArgumentNullException
IndexOutOfRangeException
MulticastNotSupportedException
ObjectDisposedException
SmtpException
OutOfMemoryException
FormatException
OverflowException
NotImplementedException
ArrayTypeMismatchException
SocketException
SecurityException
-
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, RankException, ArrayTypeMismatchException, OutOfMemoryException, EventSourceException, InvalidOperationException, MulticastNotSupportedException, ObjectDisposedException, SmtpException, OverflowException, NotImplementedException, SocketException, SecurityException
- Throws:
java.lang.Throwable
ArgumentNullException
ArgumentException
NotSupportedException
ArgumentOutOfRangeException
FormatException
PlatformNotSupportedException
IndexOutOfRangeException
RankException
ArrayTypeMismatchException
OutOfMemoryException
EventSourceException
InvalidOperationException
MulticastNotSupportedException
ObjectDisposedException
SmtpException
OverflowException
NotImplementedException
SocketException
SecurityException
-
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, RankException, ArrayTypeMismatchException, OutOfMemoryException, EventSourceException, InvalidOperationException, MulticastNotSupportedException, ObjectDisposedException, SmtpException, OverflowException, NotImplementedException, SocketException, SecurityException
- Throws:
java.lang.Throwable
ArgumentNullException
ArgumentException
NotSupportedException
ArgumentOutOfRangeException
FormatException
PlatformNotSupportedException
IndexOutOfRangeException
RankException
ArrayTypeMismatchException
OutOfMemoryException
EventSourceException
InvalidOperationException
MulticastNotSupportedException
ObjectDisposedException
SmtpException
OverflowException
NotImplementedException
SocketException
SecurityException
-
Dispose
public void Dispose() throws java.lang.Throwable, NotSupportedException, ArgumentException, InvalidOperationException, PlatformNotSupportedException
- Throws:
java.lang.Throwable
NotSupportedException
ArgumentException
InvalidOperationException
PlatformNotSupportedException
-
Send
public void Send(MailMessage message) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, OutOfMemoryException, FormatException, EventSourceException, SmtpException, MissingMethodException, TargetInvocationException, SerializationException, SocketException, IOException, UnreachableException, OverflowException, NotImplementedException
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
ArgumentNullException
OutOfMemoryException
FormatException
EventSourceException
SmtpException
MissingMethodException
TargetInvocationException
SerializationException
SocketException
IOException
UnreachableException
OverflowException
NotImplementedException
-
Send
public void Send(java.lang.String from, java.lang.String recipients, java.lang.String subject, java.lang.String body) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, FormatException, IndexOutOfRangeException, OutOfMemoryException, EventSourceException, SocketException, SmtpException, CultureNotFoundException, SerializationException, IOException, ArgumentNullException, UnreachableException, OverflowException, NotImplementedException
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
FormatException
IndexOutOfRangeException
OutOfMemoryException
EventSourceException
SocketException
SmtpException
CultureNotFoundException
SerializationException
IOException
ArgumentNullException
UnreachableException
OverflowException
NotImplementedException
-
SendAsync
public void SendAsync(MailMessage message, NetObject userToken) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, SmtpException, IndexOutOfRangeException, OutOfMemoryException, FormatException, EventSourceException, MissingMethodException, TargetInvocationException, SerializationException, UnreachableException, OverflowException, NotImplementedException, ArgumentNullException, AbandonedMutexException, SocketException, IOException, SecurityException
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
SmtpException
IndexOutOfRangeException
OutOfMemoryException
FormatException
EventSourceException
MissingMethodException
TargetInvocationException
SerializationException
UnreachableException
OverflowException
NotImplementedException
ArgumentNullException
AbandonedMutexException
SocketException
IOException
SecurityException
-
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, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, FormatException, IndexOutOfRangeException, OutOfMemoryException, EventSourceException, SmtpException, CultureNotFoundException, SerializationException, UnreachableException, OverflowException, NotImplementedException, AbandonedMutexException, SocketException, SecurityException
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
FormatException
IndexOutOfRangeException
OutOfMemoryException
EventSourceException
SmtpException
CultureNotFoundException
SerializationException
UnreachableException
OverflowException
NotImplementedException
AbandonedMutexException
SocketException
SecurityException
-
SendAsyncCancel
public void SendAsyncCancel() throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException
-
close
public void close() throws java.lang.Exception
- Specified by:
close
in 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, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException
-
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, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, 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, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, 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, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, 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, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException, NotSupportedException, OverflowException, IndexOutOfRangeException, FormatException, OutOfMemoryException, ExternalException, UnreachableException, UriFormatException, InvalidTimeZoneException, RankException, ArrayTypeMismatchException
- Throws:
java.lang.Throwable
ArgumentNullException
ArgumentException
PlatformNotSupportedException
InvalidOperationException
ArgumentOutOfRangeException
CultureNotFoundException
ObjectDisposedException
NotSupportedException
OverflowException
IndexOutOfRangeException
FormatException
OutOfMemoryException
ExternalException
UnreachableException
UriFormatException
InvalidTimeZoneException
RankException
ArrayTypeMismatchException
-
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, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException, 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
-
-