当我通过其他 SMTP 服务器发送电子邮件时,电子邮件进入垃圾邮件

2024-08-23php开发问题
8

本文介绍了当我通过其他 SMTP 服务器发送电子邮件时,电子邮件进入垃圾邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我正在使用 PHP Swift_mailer 库代表客户向客户的客户发送电子邮件.我使用他们的 SMTP 服务器、端口、登录名、密码:

I'm using PHP Swift_mailer library to send emails to my customers' clients from behalf of customers. I use their SMTP server, port, login, pass:

$transport = Swift_SmtpTransport::newInstance($mail_server['host'], $mail_server['port']);
$transport->setUsername($mail_server['username'])
    ->setPassword($mail_server['password']);

这几个月运行良好,但现在我的一些客户的电子邮件开始出现在垃圾邮件文件夹中?

It worked pretty well for a few months, but now the emails started to appear in a Spam folder for some of my customers?

有没有可能是我的问题(PHP 服务器)或我客户的 SMTP 服务器的问题?

Is it possible that the reason could be at my end (PHP server) or the problem in in my customer's SMTP server?

提前致谢!

推荐答案

这是因为你的 SMTP 服务器.不是运行 PHP 的服务器.SMTP 服务器被目标邮件服务器阻止.为了确保这一点,如果您使用 Gmail 服务器更改设置(在 PHP 代码中),它将不会再进入垃圾邮件文件夹.

It's because of your SMTP server. Not the server that runs PHP. The SMTP server is blocked by the destination mail server. For making sure of it, if you change your settings (in PHP code) with Gmail server, it won't go to the spam folder any more.

几个月前它运行良好,但现在电子邮件开始出现问题出现在我的某些客户的垃圾邮件文件夹中?

It worked pretty well for a few months, but now the emails started to appear in a Spam folder for some of my customers?

这是因为目标邮件服务器已将您的 SMTP 服务器添加到他们的黑名单中.

That's because the destination mail server has added your SMTP server to their blacklist.

这篇关于当我通过其他 SMTP 服务器发送电子邮件时,电子邮件进入垃圾邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

PHP实现DeepL翻译API调用
DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以...
2025-08-20 php开发问题
168

PHP通过phpspreadsheet导入Excel日期数据处理方法
PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的...
2024-10-23 php开发问题
287

mediatemple - 无法使用 codeigniter 发送电子邮件
mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)...
2024-08-23 php开发问题
11

Laravel Gmail 配置错误
Laravel Gmail Configuration Error(Laravel Gmail 配置错误)...
2024-08-23 php开发问题
16

将 PHPMailer 用于 SMTP 的问题
Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)...
2024-08-23 php开发问题
4

关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题
Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)...
2024-08-23 php开发问题
17