So I'am trying to send an Email(with links in it) via Lotus Notes.
But it seems that Lotus has some Problems with URL's where a questionmark ("?") is inside of the URL.
This is my Code.
var emailContentStringBuilder = new StringBuilder();
foreach (var document in entities)
{
emailContentStringBuilder.AppendLine("\n" + document.FileName);
emailContentStringBuilder.AppendLine( _customerConfiguration.GetAttachmentUrl(document.EntityName));
emailContentStringBuilder.AppendLine();
}
var emailBody = String.Format(EpmResources.DocumentsEmailBodyFormat, emailContentStringBuilder);
emailBody = emailBody.Replace("\n", "%0D%0A");
Device.OpenUri(new Uri(String.Format("mailto:?&subject={1}&body={0}", emailBody, EpmResources.DocumentsEmailSubject)));
When i use this code and try to open Lotus via my Application the Emailbody and subject are empty.
I switched then Subject and Emaildbody in code.
Device.OpenUri(new Uri(String.Format("mailto:?&body={0}subject={1}", emailBody, EpmResources.DocumentsEmailSubject)));
That somehow worked a bit but it showed the subject and only a part of the emaildbody. I then look where the Emailbody stoped via debugging and noticed that it was before an "?" where it stoped showing.
so i tried replacing the "?" in the Emailbody and that worked fine.
emailBody = emailBody.Replace("?", " ");
but the Problem is i need those questionmarkes as they are a Part of an URL. Under Outlook this code works fine. So is this a lotus thing? Hopefully someone can explain this to me.