Я пытаюсь отправить электронное письмо из моего приложения asp.net mvc 3 с помощью actionmailer mvc
Я отправил его на свою учетную запись gmail и указал источник
Delivered-To: mygmail@gmail.com
Received: by 10.204.10.11 with SMTP id n11cs48097bkn;
Mon, 20 Jun 2011 09:48:33 -0700 (PDT)
Received: by 10.150.209.3 with SMTP id h3mr5801335ybg.353.1308588512444;
Mon, 20 Jun 2011 09:48:32 -0700 (PDT)
Return-Path: <noreply@mysite.com>
Received: from mail.myhostserver.com (mail.myhostserver.com. [ip address here])
by mx.google.com with ESMTP id r38si5731169yba.61.2011.06.20.19.42.41;
Mon, 20 Jun 2011 09:48:32 -0700 (PDT)
Received-SPF: fail (google.com: domain of noreply@myhostserver.com does not designate 216.41.41.125 as permitted sender) client-ip=216.11.21.125;
Authentication-Results: mx.google.com; spf=hardfail (google.com: domain of noreply@myhostserver.com does not designate 216.41.21.125 as permitted sender) smtp.mail=noreply@myhostserver.com
Message-Id: <4dff79e0.2645960a.472d.49efSMTPIN_ADDED@mx.google.com>
Received: from myhostserver (myhostserver.com [216.14.12.122]) by mail.myhostserver.com with SMTP;
Mon, 20 Jun 2011 11:47:29 -0500
MIME-Version: 1.0
From: noreply@myhostserver.com
To: mygmail@gmail.com
Date: 20 Jun 2011 09:47:30 -0700
Subject: Test Email
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
<html>=0D=0A<head>=0D=0A <title></title>=0D=0A <meta http-e=
quiv=3D"Content-Type" content=3D"text/html; charset=3DUTF-8" />=0D=0A=
</head>=0D=0A<body style=3D"font-size: 1em;">=0D=0A <img s=
rc=3D"http://www.my.site.com/Content/Images/si=
telogo.png" alt=3D"My Logo" style=3D"width: 231=
px; height: 63px;" />=0D=0A=0D=0A <div>=0D=0A =0D=0A<h2=
>TestEmail</h2>=0D=0A=0D=0A=0D=0A </div>=0D=0A <div>My Mai=
ler Footer</div>=0D=0A</body>=0D=0A=0D=0A</html>=0D=0A
* обратите внимание на имена серверов, мой адрес электронной почты, IP-адрес был изменен.
Я просмотрел то же сообщение через Thunderbird (так что это тот же адрес Gmail), и я получил тот же HTML-код со всеми этими забавными персонажами.
Теперь я отправил его на другой адрес электронной почты, настроенный с exchange и просматриваемый в outlook 2010.
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body style="font-size: 1em;">
<img src="http://mysite.com/Content/Images/sitelogo.png" alt="mysite Logo" style="width: 231px; height: 63px;" />
<div>
<h2>TestEmail</h2>
</div>
<div> Mailer Footer</div>
</body>
</html>
Почему он выглядит нормально в outlook 2010, но не в gmail / thunderbird?
Редактировать
Вот один из скрепок
Delivered-To: myemailk@gmail.com
Received: by 14.227.5.217 with SMTP id w57cs20187wes;
Wed, 22 Jun 2011 09:56:05 -0700 (PDT)
Received: by 11.132.41.10 with SMTP id v10mr221945wfv.185.1308761763097;
Wed, 22 Jun 2011 09:56:03 -0700 (PDT)
Return-Path: <bo-bwff20ebg7m4p3au641sjqcgt5vvs6@b.e.staples.ca>
Received: from mta734.e.staples.com (mta734.e.staples.com [38.117.148.114])
by mx.google.com with SMTP id m3si4122907icx.82.2011.06.44.09.50.02;
Wed, 22 Jun 2011 09:56:03 -0700 (PDT)
Received-SPF: pass (google.com: domain of bo-bwff20ebg7m4p3au641sjqcgt5vvs6@b.e.staples.ca designates 38.137.148.134 as permitted sender) client-ip=34.107.118.125;
DomainKey-Status: good (test mode)
Authentication-Results: mx.google.com; spf=pass (google.com: domain of bo-bwff20ebg7m4p3au641sjqcgt5vvs6@b.e.staples.ca designates 38.117.148.122 as permitted sender) smtp.mail=bo-bwff20ebg7m4p3au641sjqcgt5vvs6@b.e.staples.ca; domainkeys=pass (test mode) header.From=staplescanada@e.staples.ca
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
s=200505; d=e.staples.ca;
b=Ea8rCw0vzifMnnDucyEP7U7dnIz1GZ80sb9XKhvzHr3Qa+iIAQjtX0PT+W0HrNTU2hPumPnz1GOC1irFMNvx8eYPeLqJvk1l6BXms4VQVPMsAe/a6RYM50vVbxWOq0msmtMzVx5YhQbMhMl9XqlhR/czwlzJ0GJjbtoMbEHwU0Y=;
h=Date:Message-ID:List-Unsubscribe:From:To:Subject:MIME-Version:Reply-To:Content-type;
Date: Wed, 22 Jun 2011 16:56:24 -0000
Message-ID: <bwff20ebg7m4p3au641sjqcgt5vvs6.14705389806.671@mta734.e.staples.ca>
List-Unsubscribe: <mailto:rm-0bwff20ebg7m4p3au641sjqcgt5vvs6@e.staples.ca>
From: "Staples" <staplescanada@e.staples.ca>
To: myemailk@gmail.com
Subject: Summer Hot Buys!
MIME-Version: 1.0
Reply-To: "Staples" <support-bwff20ebg7m4p3au641sjqcgt5vvs6@e.staples.ca>
Content-type: multipart/alternative; boundary="=bwff20ebg7m4p3au641sjqcgt5vvs6"
--=bwff20ebg7m4p3au641sjqcgt5vvs6
Content-Type: text/plain; charset="iso-8859-1"
Content-transfer-encoding: 8bit
Я не уверен, почему он говорит text / plain, так как он использует html.