Laravel Markdown-发送到gmail地址的电子邮件被标记为垃圾邮件

时间:2019-01-23 09:12:30

标签: php laravel email gmail markdown

这是我的电子邮件模板

@component('mail::message')
<img src="{{ URL::asset("https://mywebsite.com/openUpdate/$userId") }}" width="1" height="1" alt="">
# Hello {{$userName}},

----Email Body-----

@component('mail::button', ['url' => 'https://mywebsite.com/redirecting/' . $userId])
Click here to confirm your appointment
@endcomponent

{{ config('app.name') }}<br>
Click <a href="{{ URL::asset("https://mywebsite.com/unsubscribe/$userId") }}">here</a> to un-subscribe.

@endcomponent

每当我将此电子邮件发送到Gmail地址时,都会收到以下错误消息,指出我的电子邮件被标记为垃圾邮件

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed:

myemail@gmail.com
host 5817.smtp.antispamcloud.com [38.89.254.164]
SMTP error from remote mail server after end of data:
550 High probability of spam
Reporting-MTA: dns; nwpro2.fcomet.com

Action: failed
Final-Recipient: rfc822;myemail@gmail.com
Status: 5.0.0
Remote-MTA: dns; 5817.smtp.antispamcloud.com
Diagnostic-Code: smtp; 550 High probability of spam

即使我只将电子邮件开头开头@component('mail::message')和末尾@endcomponent都删除了,它还是失败。

但是它仅接受纯文本。

如何确保电子邮件已正确发送并且未标记为垃圾邮件?

2 个答案:

答案 0 :(得分:1)

使用服务器php mail()函数始终是个坏主意,因为您的托管服务提供商是托管服务,而不是邮件传输服务。这是不同的服务。如果要将邮件放入收件箱,则可以订购具有专用IP地址的vps并开始管理域/ ip信誉,也可以从sendgrid,mailgun等订购服务。 另外,您还可以准备实施标准的电子邮件策略(例如2种选择加入),甚至更好-您可以在使用mailcheck.co之类的服务发送邮件之前先检查邮件 您需要真正降低邮件的跳出率,以保持IP /域的良好声誉。如果您使用某些第三方邮件发送服务,他们将为您管理ip信誉,但它们还将测量您的绑定率和垃圾邮件率。如果您的费率高于平均水平,他们将禁止您的帐户。 由于与反垃圾邮件相关的众多技术(例如DKIM,SPF,DMARC等),如今发送电子邮件并非易事。 结束语-收件箱中仍然有垃圾邮件,但是如果没有额外的努力,我将无法再从服务器发送电子邮件。

答案 1 :(得分:0)

我遇到了同样的问题,但我暂时停止使用 Markdown 并使用 view()。

当然,我们需要有平面html模板来查看刀片文件。