I tried sending email from Gmail account and able to send the email successfully and save the email in my sent items .But,i got stuck when I try to send email from my Office account ,I am facing some issue .it's able to connect with the server but not able to authenticate if user I'd and password is provided.
MailBuilder builder = new MailBuilder();
builder.From.Add(new MailBox("ajayara@trimaxamericas.com", "Ashu"));
builder.To.Add(new MailBox("Ashishjr3@gmail.com", "Jayara"));
builder.Subject = "Test";
builder.Text = "This is plain text message.";
IMail email = builder.Create();
using (Smtp smtp = new Smtp())
{
smtp.Connect("webmail.dataglove-us.com",25);
smtp.UseBestLogin("Ajayara@trimaxamericas.com", "*******");
ISendMessageResult result = smtp.SendMessage(email);
if (result.Status == SendMessageStatus.Success)
{
}
smtp.Close();
}
can you please suggest something?