#if MONO_SECURITY_ALIAS
extern alias MonoSecurity;
#endif
-#if MONO_X509_ALIAS
-extern alias PrebuiltSystem;
-#endif
#if MONO_SECURITY_ALIAS
using MSI = MonoSecurity::Mono.Security.Interface;
#else
using MSI = Mono.Security.Interface;
#endif
-#if MONO_X509_ALIAS
-using X509CertificateCollection = PrebuiltSystem::System.Security.Cryptography.X509Certificates.X509CertificateCollection;
-#else
-using X509CertificateCollection = System.Security.Cryptography.X509Certificates.X509CertificateCollection;
-#endif
using System.Security.Cryptography.X509Certificates;
#endif
ICredentialsByHost credentials;
string pickupDirectoryLocation;
SmtpDeliveryMethod deliveryMethod;
+ SmtpDeliveryFormat deliveryFormat;
bool enableSsl;
#if SECURITY_DEP
X509CertificateCollection clientCertificates;
port = value;
}
}
-
+
+ public SmtpDeliveryFormat DeliveryFormat {
+ get { return deliveryFormat; }
+ set {
+ CheckState ();
+ deliveryFormat = value;
+ }
+ }
+
[MonoTODO]
public ServicePoint ServicePoint {
get { throw new NotImplementedException (); }
// FIXME: parse the list of extensions so we don't bother wasting
// our time trying commands if they aren't supported.
- // Get the FQDN of the local machine
- string fqdn = Dns.GetHostEntry (Dns.GetHostName ()).HostName;
+ // get the host name (not fully qualified)
+ string fqdn = Dns.GetHostName ();
+ try {
+ // we'll try for the fully qualified name - ref: bug #33551
+ fqdn = Dns.GetHostEntry (fqdn).HostName;
+ }
+ catch (SocketException) {
+ // we could not resolve our name but will continue with the partial name
+ // IOW we won't fail to send email because of this - ref: bug #37246
+ }
status = SendCommand ("EHLO " + fqdn);
if (IsError (status)) {
}
}
- public void Send (string from, string to, string subject, string body)
+ public void Send (string from, string recipients, string subject, string body)
{
- Send (new MailMessage (from, to, subject, body));
+ Send (new MailMessage (from, recipients, subject, body));
}
public Task SendMailAsync (MailMessage message)
worker.RunWorkerAsync (userToken);
}
- public void SendAsync (string from, string to, string subject, string body, object userToken)
+ public void SendAsync (string from, string recipients, string subject, string body, object userToken)
{
- SendAsync (new MailMessage (from, to, subject, body), userToken);
+ SendAsync (new MailMessage (from, recipients, subject, body), userToken);
}
public void SendAsyncCancel ()