I have this code that send email throw outlook
Microsoft.Office.Interop.Outlook.Application oApp = new Microsoft.Office.Interop.Outlook.Application();
Microsoft.Office.Interop.Outlook.MailItem oMsg = (Microsoft.Office.Interop.Outlook.MailItem)oApp.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem);
oMsg.To = "test@test.com"; oMsg.CC = "test1@test.com"; oMsg.Subject = "Fiche De Non-Confoemité N°: " + txtOrderNumber.Text+"/"+ txtCreationDate.DateTime.Year;
oMsg.BodyFormat = Microsoft.Office.Interop.Outlook.OlBodyFormat.olFormatHTML;
oMsg.Display(false);
oMsg.HTMLBody = "<font size='18px'>"+"Un nouveau fiche de non-confoemité a été ajouté: "+
"<br />" + "N°: " + txtOrderNumber.Text + "/" + txtCreationDate.DateTime.Year +
"<br />" + "Détecteur: " + cmbDetecteurStructure.Text +
"<br />" + "Personne Concernée: " + cmbRelevantEmployee.Text +
"<br />" + "Date: " + txtCreationDate.Text +
"<br />" + "Crée par « Smart Industrial Management »" +"</font>"+ oMsg.HTMLBody ;
I tried different values(14,16,18,20) but I always end up with the same size (10) in outlook.
How can I solve this problem ?.
Wrap your text in some block, span
for example, and add style
to it:
<span style=\"font-size:16px\">Un nouveau fiche de non-confoemité a été ajouté:</span>
or just apply style
to your font
tag:
<font style=\"font-size:16px\">