尝试使用SMTP发送邮件时出错 [英] An error when trying to send a mail using SMTP

查看:211
本文介绍了尝试使用SMTP发送邮件时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

早上好。



我正在开发一个应该向某个收件人发送邮件的应用程序。我收到了一个邮件地址tarek@abcd.fr用它发送邮件到tarek@gmail.com。每当我执行我的程序时,我发送数据时收到以下消息

553抱歉该域名不允许通过此mta(#5.7.1)ovh转发



我试图将我的端口从25改为587(甚至465)但是我得到了相同的结果。



我我在Windows 8上使用Visual Studio 2010.如果您需要更多信息或解释,欢迎您。



提前谢谢:)

Good morning guys.

I am working on an application that should send mails to some recipient. I got a mail address tarek@abcd.fr use it to send a mail to tarek@gmail.com. each time I execute my program I got the following message when I send DATA
"553 sorry that domain isn't allowed to be relayed thru this mta (#5.7.1) ovh"

I tried to change my port from 25 to 587 (even 465) but I got the same result.

I am using Visual Studio 2010 on Windows 8. I f you need more information or explanation, you are welcome.

Thank you in advance :)

推荐答案

您使用的是错误的SMTP服务器(它不接受来自abcd.fr域的邮件)或存在身份验证问题(如Richard所述)。



对于abcd.fr帐户(SMTP服务器,端口,身份验证方法),使用与邮件客户端相同的设置。设置应由您的域名托管服务商提供。





您的SMTP通信无效。您可以使用telnet客户端手动连接,并将其用作代码的基础。请参阅如何使用Telnet测试SMTP通信 [ ^ ]。



您的实际代码有多个错误(发送HELO而非EHLO,无需身份验证)。
You are using the wrong SMTP server (it did not accept mails from the abcd.fr domain) or there is an authentication problem (as already noted by Richard).

Use the same settings as in your mail client for the abcd.fr account (SMTP server, port, authentication method). The settings should be provided by your domain hoster.


Your SMTP communication is invalid. You can use a telnet client to connect manually and use that as base for your code. See for example How to Use Telnet to Test SMTP Communication[^].

Your actual code has multiple errors (sending HELO instead of EHLO, no authentication).


这篇关于尝试使用SMTP发送邮件时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆