munir tailor

munir tailor

  • 1.2k
  • 534
  • 15k

transport failed error

Nov 1 2018 2:48 AM
CDO.Message message = new CDO.Message();
CDO.IConfiguration configuration = message.Configuration;
ADODB.Fields fields = configuration.Fields;
ADODB.Field field = fields["http://schemas.microsoft.com/cdo/configuration/smtpserver"];
field.Value = "smtp.zoho.com";
field = fields["http://schemas.microsoft.com/cdo/configuration/smtpserverport"];
field.Value = 465;
field = fields["http://schemas.microsoft.com/cdo/configuration/sendusing"];
field.Value = CDO.CdoSendUsing.cdoSendUsingPort;
field = fields["http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"];
field.Value = CDO.CdoProtocolsAuthentication.cdoBasic;
field = fields["http://schemas.microsoft.com/cdo/configuration/sendusername"];
field.Value = "";
field = fields["http://schemas.microsoft.com/cdo/configuration/sendpassword"];
field.Value = "";
field = fields["http://schemas.microsoft.com/cdo/configuration/smtpusessl"];
field.Value = 1;
fields.Update();
message.From = "";
message.To = "";
message.Subject = subject;
message.HTMLBody = txtMessage.Text;
// Send message.
message.Send();