I created a razor page that sends and email confirming to a group of users that a request has been made. When I look my inbox on the web or the windows email app, the mail looks jsut the way I want it. But the users use the outlook client to check on their emails and the mail looks way too different with the logo taking a whole table cell and the rest looks tiny. I use an alternate view to embbed the image but I don't know if the image is causin the problem or something else. Here's my code:
string contentID = Guid.NewGuid().ToString().Replace("-", "");
tab = tab.Replace("/img/logo500.png", "cid:" + contentID);
// tab = tab.Replace("<div id=\"divLinkAprob\"></div>", "<a href=http://localhost:999/SolicitudAdicionalesMP?op=" + op + "&lote=1121035&producto=" + producto.Replace(" ", "%20") + "&itemcode=" + itemCode + "&itemname=" + itemName.Replace(" ", "%20") + "&cantenvasada=" + cantEnvasada + "&cantasignada=" + cantAsignada + "&adicional=" + adicional + "&poradicional=" + porAdicional + "&motivo=" + motivo.Replace(" ", "%20") + "&tab=" + tab.Replace(" ", "%20") + ">APROBAR</a>");
tab = tab.Replace("<div id=\"enviadoPor\"></div>", "Aprobado por: " + usuario);
tab += "Aprobado por: " + usuario;
AlternateView htmlView = AlternateView.CreateAlternateViewFromString(tab, null, "text/html");
//path of image or stream
LinkedResource imagelink = new LinkedResource("wwwroot/img/logo500.png", "image/png");
imagelink.ContentId = contentID;
imagelink.TransferEncoding = System.Net.Mime.TransferEncoding.Base64;
htmlView.LinkedResources.Add(imagelink);
mail.AlternateViews.Add(htmlView);