发送电子邮件的代码:
MailAddress addressFrom = new MailAddress("jack.du@e-iceblue.com", "Jack Du");
MailAddress addressTo = new MailAddress("susanwong32@outlook.com");
MailMessage message = new MailMessage(addressFrom, addressTo);
message.Date = DateTime.Now;
message.Subject = "Sending Email with HTML Body";
string htmlString = **my html code her to string convert**
;
message.BodyHtml = htmlString;
SmtpClient client= new SmtpClient();
client.Host = "smtp.outlook.com";
client.Port = 587;
client.Username = addressFrom.Address;
client.Password = "password";
client.ConnectionProtocols = ConnectionProtocols.Ssl;
client.SendOne(message);
Console.WriteLine("Sent Successfully!");
Console.Read();
我需要使用Visual Basic .Net发送电子邮件
问题发送电子邮件后,我收到邮箱 我的文字显示在我的图片下方,而下面的html代码显示正常工作
点击查看我的html code
答案 0 :(得分:1)
我将在容器样式中使用背景图像,如下所示
.container {
position: relative;
background: url('https://media.wmagazine.com/photos/585353e0d3b7a5db18f3a866/master/h_600,c_limit/GettyImages-105726097_master.jpg');
text-align: center;
color: orange;
border: 1px solid #0d9ecf;
width: 437px;
height: 600px;
}
而不是使用<img>
标记。