锚标记不适用于通过SMTP python发送的HTML内容

时间:2019-01-14 08:40:55

标签: html python-3.x smtp

我正在使用python SMTP通过邮件发送一些html内容作为正文。 html内容或html文件为:`

<html>
  <body>
  <table align="center" border="2" cellspacing="6" cellpadding="9" width="640" >
<tr>
<td bgcolor="cornsilk">
<table align="center"><tr><td align="center">
<b>
<font size="5" color="blue">Funding Newsletter</font>
<br>
<font size="2" color="blue">2019-01-14</font>
</b>
</td></tr></table>
<br><br>
    <ul><li><a href="#518.3812196729551obj">Behavioral Telehealth Company with 190 SNF Clients Lands Series A Funding,</li><li><a href="#801.4476392602498obj">A Bank Portfolio Of 12 High Quality 'Buffett Banks'</li><li><a href="#242.84483174226125obj">YHB Investment Advisors Inc. Has $295000 Stake in Liberty Tripadvisor</li><li><a href="#566.893959336214obj">This Week in XR: My Most Embarrassing CES 2019 Moment</li><li><a href="#226.84459458724115obj">WorkJam Announces Acquisition of Peerio Technologies</li></ul><br><br>
   <h3><a name="801.4476392602498obj"><a href="https://seekingalpha.com/article/4233042-bank-portfolio-12-high-quality-buffett-banks"><b>A Bank Portfolio Of 12 High Quality 'Buffett Banks'</b></a></a></h3>
                        <p>None</p><h3><a name="226.84459458724115obj"><a href="https://www.thepublicopinion.com/business/associated_press/workjam-announces-acquisition-of-peerio-technologies/article_556c952c-8f71-5314-b1a9-8f8deb1857f3.html"><b>WorkJam Announces Acquisition of Peerio Technologies</b></a></a></h3>
                        <p>View all available Public Opinion e-Editions, including the latest, for 24 hours.
Automatically disables after 24 hours.
Usually 20 e-Editions are available for viewing.
Computer, laptop, tablet and smartphone can all be used to view e-Edition.
The e-Edition can be found at thepublicopinion.com/eedition.</p><h3><a name="566.893959336214obj"><a href="https://www.forbes.com/sites/charliefink/2019/01/13/this-week-in-xr-my-most-embarrassing-ces-2019-moment/"><b>This Week in XR: My Most Embarrassing CES 2019 Moment</b></a></a></h3>
                        <p>Vuzix launches its Blade AR glasses later this month.
I saw AR glasses from NReal, RealMax, DigiLens, 3rd Eye, Dreamglass and Rokid.
There were only a couple of non-CES items worth noting:RecRoom reached over 1 million headsets in 2018.
The free to play VR social experience hit a milestone near the end of 2018, being installed on over 1 million VR headsets.
Tom Emmrich of Super Ventures, a fund focused on AR, posted his 2019 predictions for AR.</p><h3><a name="518.3812196729551obj"><a href="https://skillednursingnews.com/2019/01/behavioral-telehealth-company-with-190-snf-clients-lands-series-a-funding-new-ceo/"><b>Behavioral Telehealth Company with 190 SNF Clients Lands Series A Funding,</b></a></a></h3>
                        <p>A behavioral telehealth company focused on caring for Medicare populations in rural areas — including skilled nursing residents — closed a Series A Preferred growth equity funding round led by Spring Lake Equity Partners.
The Novato, Calif.-based Forefront Telecare also added Rob Rebak, who previously served as president and CEO of behavioral telehealth platform AbleTo, as CEO.
Forefront, which was founded in 2010, offers its services in approximately 190 skilled nursing facilities in 20 states.
The way it primarily expands, however, is by adding rural hospitals and then reaching out to the acute care providers’ SNF partners, Knudsen explained.
In the state of Washington, for instance, some skilled providers have shifted to or added behavioral health as they battle low Medicaid reimbursements.</p><h3><a name="242.84483174226125obj"><a href="https://www.baseballdailydigest.com/news/2019/01/13/yhb-investment-advisors-inc-has-295000-stake-in-liberty-tripadvisor-holdings-inc-series-a-ltrpa.html"><b>YHB Investment Advisors Inc. Has $295000 Stake in Liberty Tripadvisor</b></a></a></h3>
                        <p>None</p>
   <br><br><br>

Regards, <br>
</td></tr>
</table> 
  </body>
</html>

当我运行以下html脚本时,anchor标签工作得很好。但是,当我尝试通过msg.attach(MIMEText(body, 'html'))通过SMTP发送相同的代码时,锚标记在收到的邮件中不起作用(在单击索引时,它不会转到该索引的相应段落)。能帮我知道是什么问题,或者这是通过SMTP发送带有锚点的html代码的正确方法。

0 个答案:

没有答案