PowerTCP Mail for .NET
Send(Stream,String,String) Method




Stream containing an ASCII (7-bit) encoded email message.
Address to use for "MAIL FROM". This can be generated using MailAddress.ToString().
Addresses to use for "RCPT TO". This can be generated using MailAddressCollection.ToString().
Send a previously encoded message to a mail server, using from and recipients for constructing the SMTP envelope.
Syntax
Public Overloads Function Send( _
   ByVal encodedMessage As Stream, _
   ByVal fromAddress As String, _
   ByVal recipientAddresses As String _
) As SmtpResult
Dim instance As Smtp
Dim encodedMessage As Stream
Dim fromAddress As String
Dim recipientAddresses As String
Dim value As SmtpResult
 
value = instance.Send(encodedMessage, fromAddress, recipientAddresses)

Parameters

encodedMessage
Stream containing an ASCII (7-bit) encoded email message.
fromAddress
Address to use for "MAIL FROM". This can be generated using MailAddress.ToString().
recipientAddresses
Addresses to use for "RCPT TO". This can be generated using MailAddressCollection.ToString().

Return Value

An SmtpResult object that describes the sent message.
Exceptions
ExceptionDescription
ProtocolExceptionBad SMTP protocol response received from server.
System.Net.Sockets.SocketExceptionA socket failure.
System.FormatExceptionBad address format.
Remarks

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.

See Also

Reference

Smtp Class
Smtp Members
Overload List


PowerTCP Mail for .NET Documentation Version 4.3
© 2018 Dart Communications. All Rights Reserved.
Send comments on this topic