Hi everyone ,
I need some help , im sending an email from my app,it succefully sends it but the styles do not render. Im sending the mail in the message body as below:
SMTP.To.Add("[email protected]")
SMTP.Subject = "HTML email testing "
SMTP.HtmlBody = True
SMTP.Body = functionToGetHTMLcontent
SMTP.send
Below is the function to get the HTML content :
Sub functionToGetHTMLcontent As String
Dim sb As StringBuilder
sb.Initialize
sb.Append("<html><!DOCTYPE html><html><body><table align='left' border='1' cellpadding='1' cellspacing='0' width='100%'>")
sb.Append("<tbody>")
''---RED--------------------------------------------------------------------------------------------
sb.Append("<tr height='30'>")
sb.Append("<td style='width=5%' bgcolor=#FE2121 align='center'><font COLOR=#FFFFFF><b>") ''#FE2121
sb.Append("No.</b></font></td>")
sb.Append("<td style='width: 95%' bgcolor=#FE2121><font COLOR=#FFFFFF><b>")
sb.Append("Title 1</b></font></td>")
sb.Append("</tr>")
sb.Append("</tbody>")
sb.Append("</table><br><br><strong>Note:</strong><br/> Click <strong>[Reply All]</strong> to respond to this mail.</body><html><br><br><br>")
Return sb.ToString
End Sub
The result which I receive in my mail as below (The size of table is output correctly but the font (white) and background color (red) do not get displayed
)
No.Title 1
Note:
Click
[Reply All] to respond to this mail
Is there any property that i need to add , maybe the "Content-type: text/html" anywhere ?
Thanks in advance.