简体   繁体   English

SMTP服务器响应:530 5.7.57

[英]SMTP server response: 530 5.7.57

I am trying to send a mail with php. 我正在尝试用php发送邮件。 I watched in the internet to find a solution and I found diferent ways but not one helped me. 我在互联网上观看,找到了解决方案,但发现了不同的方法,但没有人帮助过我。 When I come to the code where it should send the mail I got following error: 当我到达应该发送邮件的代码时,出现以下错误:

mail(): SMTP server response: 530 5.7.57 SMTP; mail():SMTP服务器响应:530 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM [AM4PR08CA0065.eurprd08.prod.outlook.com]" 客户端未通过身份验证可在[MA4PR08CA0065.eurprd08.prod.outlook.com]的邮件中发送匿名邮件”

mail call: 邮寄电话:

$mailAdr = "name@company.ch";
$subject = "subject";
$msg = "message!";
$header = 'FROM: My WebSite <name@company.ch>';
mail($mailAdr, $subject, $msg, $header);

I set the right smtp and port. 我设置了正确的smtp和端口。 Can anyone tell me what I am doing wrong? 谁能告诉我我在做什么错?

I think you have to add your FROM header that is missing in your code. 我认为您必须添加代码中缺少的FROM标头。

<?php
$header = 'From: My Website <info@example.com>' . "\r\n";

mail($empfaenger, $betreff, $nachricht, $header);
?>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 PHP SMTP 错误:SMTP 服务器响应:530 5.7.0 - PHP SMTP ERROR: SMTP server response: 530 5.7.0 WAMP-SMTP服务器响应:要求530 SMTP身份验证 - WAMP - SMTP server response: 530 SMTP authentication is required SMTP 服务器响应:530 5.7.0 必须先发出 STARTTLS 命令 - SMTP server response: 530 5.7.0 Must issue a STARTTLS command first php邮件警告-SMTP服务器响应:530不允许中继 - php mail warning - SMTP server response: 530 Relaying not allowed SMTP 服务器响应:530 5.7.0 必须首先发出 STARTTLS 命令。 Windows 7的 - SMTP server response: 530 5.7.0 Must issue a STARTTLS command first. windows 7 WampServer:警告:mail():SMTP 服务器响应:530 5.7.0 必须先发出 STARTTLS 命令 - WampServer: Warning: mail(): SMTP server response: 530 5.7.0 Must issue a STARTTLS command first php mail函数错误 - &gt;警告:mail()[function.mail]:SMTP服务器响应:530 5.7.0必须先发出STARTTLS命令 - php mail function error -> Warning: mail() [function.mail]: SMTP server response: 530 5.7.0 Must issue a STARTTLS command first 需要 530 SMTP 身份验证 - 530 SMTP authentication is required 如何解决此错误( mail(): SMTP server response: 530 5.7.0 Must issue a STARTTLS command first. i2sm7399406pjt.19 - gsmtp ) - How solve this error ( mail(): SMTP server response: 530 5.7.0 Must issue a STARTTLS command first. i2sm7399406pjt.19 - gsmtp ) SMTP服务器响应:451 - SMTP server response: 451
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM