public class MailMessage extends NetObject implements java.lang.AutoCloseable
.NET documentation at https://learn.microsoft.com/dotnet/api/System.Net.Mail.MailMessage
Powered by JCOBridge: more info at https://www.jcobridge.com
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
assemblyFullName
Fully assembly qualified name: System.Net.Mail, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
|
static java.lang.String |
assemblyShortName
Assembly name: System.Net.Mail
|
static java.lang.String |
className
Qualified class name: System.Net.Mail.MailMessage
|
static JCType |
classType
The type managed from JCOBridge.
|
| Constructor and Description |
|---|
MailMessage()
Initializes a new instance by invoking the .NET constructor.
|
MailMessage(MailAddress from,
MailAddress to)
Initializes a new instance by invoking the .NET constructor.
|
MailMessage(java.lang.Object instance)
Internal constructor.
|
MailMessage(java.lang.String from,
java.lang.String to)
Initializes a new instance by invoking the .NET constructor.
|
MailMessage(java.lang.String from,
java.lang.String to,
java.lang.String subject,
java.lang.String body)
Initializes a new instance by invoking the .NET constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static MailMessage |
cast(IJCOBridgeReflected from)
Try to cast the
IJCOBridgeReflected instance into MailMessage, a cast assert is made to check if types are compatible. |
void |
close() |
void |
Dispose()
Invokes the .NET member Dispose.
|
AlternateViewCollection |
getAlternateViews()
Gets the value of the .NET property AlternateViews.
|
AttachmentCollection |
getAttachments()
Gets the value of the .NET property Attachments.
|
MailAddressCollection |
getBcc()
Gets the value of the .NET property Bcc.
|
java.lang.String |
getBody()
Gets the value of the .NET property Body.
|
Encoding |
getBodyEncoding()
Gets the value of the .NET property BodyEncoding.
|
TransferEncoding |
getBodyTransferEncoding()
Gets the value of the .NET property BodyTransferEncoding.
|
MailAddressCollection |
getCC()
Gets the value of the .NET property CC.
|
DeliveryNotificationOptions |
getDeliveryNotificationOptions()
Gets the value of the .NET property DeliveryNotificationOptions.
|
MailAddress |
getFrom()
Gets the value of the .NET property From.
|
NameValueCollection |
getHeaders()
Gets the value of the .NET property Headers.
|
Encoding |
getHeadersEncoding()
Gets the value of the .NET property HeadersEncoding.
|
boolean |
getIsBodyHtml()
Gets the value of the .NET property IsBodyHtml.
|
java.lang.String |
getJCOAssemblyName()
Returns the full name of the assembly of the .NET type.
|
java.lang.String |
getJCOClassName()
Returns the full name of the .NET type.
|
java.lang.Object |
getJCOInstance()
Returns the underlying object managed by the bridge.
|
java.lang.String |
getJCOObjectName()
Returns the name of the .NET type qualified with its assembly.
|
JCType |
getJCOType()
Returns the
JCType of the .NET type. |
MailPriority |
getPriority()
Gets the value of the .NET property Priority.
|
MailAddress |
getReplyTo()
Gets the value of the .NET property ReplyTo.
|
MailAddressCollection |
getReplyToList()
Gets the value of the .NET property ReplyToList.
|
MailAddress |
getSender()
Gets the value of the .NET property Sender.
|
java.lang.String |
getSubject()
Gets the value of the .NET property Subject.
|
Encoding |
getSubjectEncoding()
Gets the value of the .NET property SubjectEncoding.
|
MailAddressCollection |
getTo()
Gets the value of the .NET property To.
|
void |
setBody(java.lang.String Body)
Sets the value of the .NET property Body.
|
void |
setBodyEncoding(Encoding BodyEncoding)
Sets the value of the .NET property BodyEncoding.
|
void |
setBodyTransferEncoding(TransferEncoding BodyTransferEncoding)
Sets the value of the .NET property BodyTransferEncoding.
|
void |
setDeliveryNotificationOptions(DeliveryNotificationOptions DeliveryNotificationOptions)
Sets the value of the .NET property DeliveryNotificationOptions.
|
void |
setFrom(MailAddress From)
Sets the value of the .NET property From.
|
void |
setHeadersEncoding(Encoding HeadersEncoding)
Sets the value of the .NET property HeadersEncoding.
|
void |
setIsBodyHtml(boolean IsBodyHtml)
Sets the value of the .NET property IsBodyHtml.
|
void |
setJCOInstance(JCObject instance)
Sets the underlying object managed by the bridge.
|
void |
setPriority(MailPriority Priority)
Sets the value of the .NET property Priority.
|
void |
setReplyTo(MailAddress ReplyTo)
Sets the value of the .NET property ReplyTo.
|
void |
setSender(MailAddress Sender)
Sets the value of the .NET property Sender.
|
void |
setSubject(java.lang.String Subject)
Sets the value of the .NET property Subject.
|
void |
setSubjectEncoding(Encoding SubjectEncoding)
Sets the value of the .NET property SubjectEncoding.
|
public static final java.lang.String assemblyFullName
public static final java.lang.String assemblyShortName
public static final java.lang.String className
public MailMessage()
throws java.lang.Throwable,
NotSupportedException,
PlatformNotSupportedException,
IndexOutOfRangeException,
OutOfMemoryException,
InvalidOperationException,
ArgumentException,
EventSourceException,
ArgumentOutOfRangeException
java.lang.Throwable - if the .NET constructor failsNotSupportedException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itOutOfMemoryException - if the .NET member raises itInvalidOperationException - if the .NET member raises itArgumentException - if the .NET member raises itEventSourceException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itpublic MailMessage(MailAddress from, MailAddress to) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException
from - the argument of type MailAddressto - the argument of type MailAddressjava.lang.Throwable - if the .NET constructor failsArgumentException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itNotSupportedException - if the .NET member raises itObjectDisposedException - if the .NET member raises itInvalidOperationException - if the .NET member raises itRankException - if the .NET member raises itArrayTypeMismatchException - if the .NET member raises itArgumentNullException - if the .NET member raises itpublic MailMessage(java.lang.Object instance)
throws java.lang.Throwable
instance - the underlying bridge object: it must be a JCObjectjava.lang.Throwable - if instance is not a JCObjectpublic MailMessage(java.lang.String from,
java.lang.String to)
throws java.lang.Throwable,
NotSupportedException,
ArgumentException,
ArgumentNullException,
IndexOutOfRangeException,
PlatformNotSupportedException,
ArgumentOutOfRangeException,
InvalidOperationException,
OutOfMemoryException,
FormatException,
RankException,
ArrayTypeMismatchException,
EventSourceException
from - the argument of type java.lang.Stringto - the argument of type java.lang.Stringjava.lang.Throwable - if the .NET constructor failsNotSupportedException - if the .NET member raises itArgumentException - if the .NET member raises itArgumentNullException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itInvalidOperationException - if the .NET member raises itOutOfMemoryException - if the .NET member raises itFormatException - if the .NET member raises itRankException - if the .NET member raises itArrayTypeMismatchException - if the .NET member raises itEventSourceException - if the .NET member raises itpublic MailMessage(java.lang.String from,
java.lang.String to,
java.lang.String subject,
java.lang.String body)
throws java.lang.Throwable,
ArgumentNullException,
ArgumentException,
InvalidOperationException,
NotSupportedException,
ArgumentOutOfRangeException,
PlatformNotSupportedException,
OutOfMemoryException,
FormatException,
EventSourceException
from - the argument of type java.lang.Stringto - the argument of type java.lang.Stringsubject - the argument of type java.lang.Stringbody - the argument of type java.lang.Stringjava.lang.Throwable - if the .NET constructor failsArgumentNullException - if the .NET member raises itArgumentException - if the .NET member raises itInvalidOperationException - if the .NET member raises itNotSupportedException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itOutOfMemoryException - if the .NET member raises itFormatException - if the .NET member raises itEventSourceException - if the .NET member raises itpublic static MailMessage cast(IJCOBridgeReflected from) throws java.lang.Throwable
IJCOBridgeReflected instance into MailMessage, a cast assert is made to check if types are compatible.from - IJCOBridgeReflected instance to be castedMailMessage instancejava.lang.Throwable - in case of error during cast operationpublic void close()
throws java.lang.Exception
close in interface java.lang.AutoCloseablejava.lang.Exceptionpublic void Dispose()
throws java.lang.Throwable,
ArgumentNullException,
NotSupportedException,
ArgumentException
java.lang.Throwable - if the call fails in the bridge or in the CLRArgumentNullException - if the .NET member raises itNotSupportedException - if the .NET member raises itArgumentException - if the .NET member raises itpublic AlternateViewCollection getAlternateViews() throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException
java.lang.Throwable - if the call fails in the bridge or in the CLRArgumentException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itNotSupportedException - if the .NET member raises itObjectDisposedException - if the .NET member raises itInvalidOperationException - if the .NET member raises itRankException - if the .NET member raises itArrayTypeMismatchException - if the .NET member raises itpublic AttachmentCollection getAttachments() throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException
java.lang.Throwable - if the call fails in the bridge or in the CLRArgumentException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itNotSupportedException - if the .NET member raises itObjectDisposedException - if the .NET member raises itInvalidOperationException - if the .NET member raises itRankException - if the .NET member raises itArrayTypeMismatchException - if the .NET member raises itpublic MailAddressCollection getBcc() throws java.lang.Throwable
java.lang.Throwable - if the call fails in the bridge or in the CLRpublic java.lang.String getBody()
throws java.lang.Throwable
java.lang.Throwable - if the call fails in the bridge or in the CLRpublic Encoding getBodyEncoding() throws java.lang.Throwable
java.lang.Throwable - if the call fails in the bridge or in the CLRpublic TransferEncoding getBodyTransferEncoding() throws java.lang.Throwable
java.lang.Throwable - if the call fails in the bridge or in the CLRpublic MailAddressCollection getCC() throws java.lang.Throwable
java.lang.Throwable - if the call fails in the bridge or in the CLRpublic DeliveryNotificationOptions getDeliveryNotificationOptions() throws java.lang.Throwable
java.lang.Throwable - if the call fails in the bridge or in the CLRpublic MailAddress getFrom() throws java.lang.Throwable
java.lang.Throwable - if the call fails in the bridge or in the CLRpublic NameValueCollection getHeaders() throws java.lang.Throwable, ArgumentOutOfRangeException, ArgumentException, PlatformNotSupportedException, IndexOutOfRangeException, OutOfMemoryException, InvalidOperationException, EventSourceException
java.lang.Throwable - if the call fails in the bridge or in the CLRArgumentOutOfRangeException - if the .NET member raises itArgumentException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itOutOfMemoryException - if the .NET member raises itInvalidOperationException - if the .NET member raises itEventSourceException - if the .NET member raises itpublic Encoding getHeadersEncoding() throws java.lang.Throwable
java.lang.Throwable - if the call fails in the bridge or in the CLRpublic boolean getIsBodyHtml()
throws java.lang.Throwable
java.lang.Throwable - if the call fails in the bridge or in the CLRpublic java.lang.String getJCOAssemblyName()
NetObjectgetJCOAssemblyName in interface IJCOBridgeReflectedgetJCOAssemblyName in class NetObjectpublic java.lang.String getJCOClassName()
NetObjectgetJCOClassName in interface IJCOBridgeReflectedgetJCOClassName in class NetObjectpublic java.lang.Object getJCOInstance()
NetObjectgetJCOInstance in interface IJCOBridgeReflectedgetJCOInstance in class NetObjectnull if there is nonepublic java.lang.String getJCOObjectName()
NetObjectgetJCOObjectName in interface IJCOBridgeReflectedgetJCOObjectName in class NetObjectpublic JCType getJCOType()
NetObjectJCType of the .NET type.getJCOType in interface IJCOBridgeReflectedgetJCOType in class NetObjectpublic MailPriority getPriority() throws java.lang.Throwable
java.lang.Throwable - if the call fails in the bridge or in the CLRpublic MailAddress getReplyTo() throws java.lang.Throwable
java.lang.Throwable - if the call fails in the bridge or in the CLRpublic MailAddressCollection getReplyToList() throws java.lang.Throwable
java.lang.Throwable - if the call fails in the bridge or in the CLRpublic MailAddress getSender() throws java.lang.Throwable
java.lang.Throwable - if the call fails in the bridge or in the CLRpublic java.lang.String getSubject()
throws java.lang.Throwable
java.lang.Throwable - if the call fails in the bridge or in the CLRpublic Encoding getSubjectEncoding() throws java.lang.Throwable
java.lang.Throwable - if the call fails in the bridge or in the CLRpublic MailAddressCollection getTo() throws java.lang.Throwable
java.lang.Throwable - if the call fails in the bridge or in the CLRpublic void setBody(java.lang.String Body)
throws java.lang.Throwable,
ArgumentException,
NotSupportedException,
InvalidOperationException,
ArgumentOutOfRangeException,
ArgumentNullException,
PlatformNotSupportedException,
IndexOutOfRangeException,
CultureNotFoundException,
FormatException
Body - the new value of the propertyjava.lang.Throwable - if the call fails in the bridge or in the CLRArgumentException - if the .NET member raises itNotSupportedException - if the .NET member raises itInvalidOperationException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itArgumentNullException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itCultureNotFoundException - if the .NET member raises itFormatException - if the .NET member raises itpublic void setBodyEncoding(Encoding BodyEncoding) throws java.lang.Throwable
BodyEncoding - the new value of the propertyjava.lang.Throwable - if the call fails in the bridge or in the CLRpublic void setBodyTransferEncoding(TransferEncoding BodyTransferEncoding) throws java.lang.Throwable
BodyTransferEncoding - the new value of the propertyjava.lang.Throwable - if the call fails in the bridge or in the CLRpublic void setDeliveryNotificationOptions(DeliveryNotificationOptions DeliveryNotificationOptions) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, CultureNotFoundException, ObjectDisposedException
DeliveryNotificationOptions - the new value of the propertyjava.lang.Throwable - if the call fails in the bridge or in the CLRArgumentException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itArgumentNullException - if the .NET member raises itInvalidOperationException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itArrayTypeMismatchException - if the .NET member raises itNotSupportedException - if the .NET member raises itCultureNotFoundException - if the .NET member raises itObjectDisposedException - if the .NET member raises itpublic void setFrom(MailAddress From) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException
From - the new value of the propertyjava.lang.Throwable - if the call fails in the bridge or in the CLRArgumentException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itNotSupportedException - if the .NET member raises itObjectDisposedException - if the .NET member raises itInvalidOperationException - if the .NET member raises itRankException - if the .NET member raises itArrayTypeMismatchException - if the .NET member raises itArgumentNullException - if the .NET member raises itpublic void setHeadersEncoding(Encoding HeadersEncoding) throws java.lang.Throwable
HeadersEncoding - the new value of the propertyjava.lang.Throwable - if the call fails in the bridge or in the CLRpublic void setIsBodyHtml(boolean IsBodyHtml)
throws java.lang.Throwable
IsBodyHtml - the new value of the propertyjava.lang.Throwable - if the call fails in the bridge or in the CLRpublic void setJCOInstance(JCObject instance)
NetObjectsetJCOInstance in class NetObjectinstance - the new underlying objectpublic void setPriority(MailPriority Priority) throws java.lang.Throwable
Priority - the new value of the propertyjava.lang.Throwable - if the call fails in the bridge or in the CLRpublic void setReplyTo(MailAddress ReplyTo) throws java.lang.Throwable
ReplyTo - the new value of the propertyjava.lang.Throwable - if the call fails in the bridge or in the CLRpublic void setSender(MailAddress Sender) throws java.lang.Throwable
Sender - the new value of the propertyjava.lang.Throwable - if the call fails in the bridge or in the CLRpublic void setSubject(java.lang.String Subject)
throws java.lang.Throwable,
NotSupportedException,
ArgumentException,
InvalidOperationException,
ArgumentNullException,
ArgumentOutOfRangeException,
PlatformNotSupportedException,
FormatException,
OutOfMemoryException,
OverflowException
Subject - the new value of the propertyjava.lang.Throwable - if the call fails in the bridge or in the CLRNotSupportedException - if the .NET member raises itArgumentException - if the .NET member raises itInvalidOperationException - if the .NET member raises itArgumentNullException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itFormatException - if the .NET member raises itOutOfMemoryException - if the .NET member raises itOverflowException - if the .NET member raises itpublic void setSubjectEncoding(Encoding SubjectEncoding) throws java.lang.Throwable
SubjectEncoding - the new value of the propertyjava.lang.Throwable - if the call fails in the bridge or in the CLR