Send an email to the indicated SMTP server.
Namespace: Ipswitch.Messaging.Framework.Mail
Assembly: Ipswitch.Messaging.Framework (in Ipswitch.Messaging.Framework.dll) Version: 1.0.0.0
Syntax
Parameters
- message
- Type: Ipswitch.Messaging.Framework.MailEmail
The message to send to the SMTP server.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | message is null. |
InvalidOperationException | No sender was specified in either the Email being sent or the Sender property. - or - No recipients were specified in either the Email being sent or the Recipients property. - or - AuthenticationType was set to something other than AuthenticationType.None and Credentials is null. |
[!:ConnectionException] | The connection to the remote host could not be established, or the connection was terminated before sending could be completed. |
InvalidOperationException | No connection is available. |
ObjectDisposedException | This object has been disposed. |
SmtpAuthenticationException | Authentication failed OR the specified authentication type was not supported by the appropriate SMTP service extenstion on the server. |
SmtpFailedRecipientsException | One or more recipients were rejected by the server. NOTE: If at least one recipient was accepted, then the message will still be sent, otherwise (all recipients were rejected) the message will not be sent. |
SmtpException | A failure occured during communication with the SMTP server. This is caused by the server rejecting a necessary command or by a failure to negotiate an SSL connection when one of the SSL connection options are selected. |
See Also