Dart.Mail Namespace > Smtp Class > Send Method : Send(Stream,String,String,TransferEncoding) Method |
Public Overloads Function Send( _ ByVal encodedMessage As Stream, _ ByVal fromAddress As String, _ ByVal recipientAddresses As String, _ ByVal bitEncoding As TransferEncoding _ ) As SmtpResult
Dim instance As Smtp Dim encodedMessage As Stream Dim fromAddress As String Dim recipientAddresses As String Dim bitEncoding As TransferEncoding Dim value As SmtpResult value = instance.Send(encodedMessage, fromAddress, recipientAddresses, bitEncoding)
public SmtpResult Send( Stream encodedMessage, string fromAddress, string recipientAddresses, TransferEncoding bitEncoding )
public: SmtpResult* Send( Stream* encodedMessage, string* fromAddress, string* recipientAddresses, TransferEncoding bitEncoding )
public: SmtpResult^ Send( Stream^ encodedMessage, String^ fromAddress, String^ recipientAddresses, TransferEncoding bitEncoding )
Exception | Description |
---|---|
ProtocolException | Bad SMTP protocol response received from server. |
System.Net.Sockets.SocketException | A socket failure. |
System.InvalidOperationException | The bitEncoding parameter is TransferEncoding.EightBit or TransferEncoding.Binary and the server does not advertise 8bit or binary transport. |
System.FormatException | Bad address format. |
System.ArgumentException | The bitEncoding parameter is not TransferEncoding.SevenBit, TransferEncoding.EightBit or TransferEncoding.Binary. |
This method is identical to Send(MailMessage,String,String), except the message has already been encoded.
Alternatively, use Send(String,String,String,String) to send a basic text message, Send(MailMessage) to use the mail addresses in the message, or Send(MailMessage,String,String) to send MailMessage using the specified envelope.
If an email address domain name contains non-ASCII characters, System.Globalization.IdnMapping.GetAscii(System.String) will be used to convert it to a valid format.
This method automatically calls Connect and Authenticate if not connected to the server and SendDirectToMx is false.