i使用blat.exe从powershell运行的blat.exe用html生成电子邮件。当我向Google域发送电子邮件时,一切都可以,并且代码生成正常。标题和其他代码看起来像这样:
<html xmlns=3D"http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf-8">
<title>My email</title>
</head>
...
<tr style=3D"height:15pt;">
<td style=3D"border: 1pt solid; border-color:black; padding-left:3.5pt=
; height: 15pt;">
...
但是,当我将相同的电子邮件发送到客户端的域时,HTML代码看起来很大不同:
<html xmlns="ttp://www.w3.org/1999/xhtml""><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>My email</title>
</head>
...
<tr style="eight:15pt;"">
<td style="order:" 1ptsolid;border-color:black;padding-left:3.5pt;height:15pt;?="">
...
您有什么想法,为什么在第二个选项中丢失引号后的第一字母,或者为什么行末尾的引号将其更改为""
或?="
?
我的布拉特命令看起来像这样: ./blat.exe 'C:pathfile.html' -f alert@clientsdomain.com -server mail.clients.server.addr -to 'my_email@google.com,other_email@clientsdomain.com' -subject 'email title' -html
事先感谢您的任何提示!
我既没有找到原因也没有确切的解决方案,但是我有一些解决方法。我用一个简单的命令使用了powershell,它起作用了:
$body= Get-Content "C:path_to_html_filefile.html" | out-string
Send-MailMessage -From "alert@clientsdomain.com" -to 'my_email@google.com', 'other_email@clientsdomain.com' -Subject "email title" -Body $body -BodyASHtml -SmtpServer "mail.clients.server.addr" -Encoding ([System.Text.Encoding]::UTF8)