[Mono-list] ERROR 535 5.7.8 Error - Occurs on linux but now windows
drLeif
l.lensgraf at gmail.com
Wed Jan 22 01:48:40 UTC 2014
ERROR 535 5.7.8 Error: Authentication failed: UGFzc3dvcmQ6
I'm getting the above error on Ubuntu but not on windows 8.1 with the
following code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net.Mail;
using System.Net;
using System.Security.Cryptography.X509Certificates;
using System.Net.Security;
using S22.Imap;
using S22;
namespace testing_email
{
class Program
{
static void Main(string[] args)
{
SmtpClient client = new SmtpClient("mail.XXXXXX.com");
client.DeliveryMethod = SmtpDeliveryMethod.Network;
client.UseDefaultCredentials = false;
client.Credentials = new
System.Net.NetworkCredential("myreportuser at XXXXX.com", "password");
client.Port = 25;
client.EnableSsl = true;
MailMessage mailit = new MailMessage();
mailit.Body = "Body body body";
mailit.Subject = "Testing Subject";
mailit.IsBodyHtml = true;
mailit.From = new MailAddress("myreportuser at XXXXXX.com");
mailit.To.Add("l.send.it at XXXXX.com");
try
{
ServicePointManager.ServerCertificateValidationCallback =
delegate(object s, X509Certificate certificate, X509Chain chain,
SslPolicyErrors sslPolicyErrors) { return true; };
client.Send(mailit);
Console.WriteLine("Message sent");
Console.ReadLine();
}
catch (Exception ex)
{
Console.WriteLine("ERROR " + ex.Message);
Console.ReadLine();
}
}
}
}
----------------------------
Once again this code runs fine out of VS2013 but can't get it to run on
monodevelop under ubuntu.
Thanks for the help in advance.
--
View this message in context: http://mono.1490590.n4.nabble.com/ERROR-535-5-7-8-Error-Occurs-on-linux-but-now-windows-tp4661761.html
Sent from the Mono - General mailing list archive at Nabble.com.
More information about the Mono-list
mailing list