0

I am trying to send an email from my Android app

public void SubmitInfo(object sender, EventArgs e)
    {
            StringBuilder htmlBodyMail = new StringBuilder();
            htmlBodyMail.AppendLine("Hello from XYZ Application!" + "\n\n" +
                "<b>Address:</b> " + App.Address + "\n\n" +
                "<b>DataTime:</b> " + App.DataTime + "\n\n" +
                "<b>GPS:</b> " + App.Latitude + ", " + App.Longitude);

            var emailTask = CrossMessaging.Current.EmailMessenger;
            if (emailTask.CanSendEmail)
            {
                var email = new EmailMessageBuilder()
                .To("xxx@xxx.com")
               .Subject("XYZ Application")
               .BodyAsHtml(htmlBodyMail.ToString())
               .WithAttachment(App._file.AbsoluteFile)
               .Build();
                emailTask.SendEmail(email);
            }   
     }

However when I receive the message in the email, there are no Bolds or end of Lines as coded into the html string. What am I doing wrong here?

Philo
  • 1,931
  • 12
  • 39
  • 77

1 Answers1

0

I have test in in native Android, it's the same effect. As user1026605 said, it was working fine before but now it's not working anymore. I think google has been disabled on purpose for security reasons too.

York Shen
  • 9,014
  • 1
  • 16
  • 40
Diana Li
  • 70
  • 9