如何将office365的电子邮件发送为“来自地址”与凭证地址不同 [英] How to send email form office365 as "from address" not same as credential address

查看:294
本文介绍了如何将office365的电子邮件发送为“来自地址”与凭证地址不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我使用带有凭据用户名和密码的smtp设置发送邮件,并且表单地址不同,我可以发送邮件。

但是,如果我使用office365,我不能发送邮件从地址作为不同的电子邮件。我附上界面的屏幕截图



使用此设置可以发送邮件

可以发送邮件 [ ^ ]



但是使用这个不能发送邮件

[无法发送邮件^ ]



这两个电子邮件地址都有收件箱,都可以发送和接收邮件。



这是我的代码

Hi,

I am send mail using gmail with smtp setting like credential username and password and form address as different , i can send mail.
But if i use office365 ,i cant send mail "From address" as different email.Below i attach screen shot of interface

Using this setting can send mail
can send mail [^]

But using this cant send mail
[cant send mail^]

Both email address got inbox,both can send and receive mails.

This is my code

Try
            Dim Smtp_Server As New SmtpClient
            Smtp_Server.UseDefaultCredentials = True
            Smtp_Server.Credentials = New              Net.NetworkCredential("noreply@replyinfomail.com","**Password**")
            Smtp_Server.Port = "587"
            Smtp_Server.EnableSsl = True
            Smtp_Server.Host = "smtp.office365.com"
            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls
            System.Net.ServicePointManager.ServerCertificateValidationCallback = AddressOf ServerCertificateValidationCallback
  
            Dim e_mail As New MailMessage()
            e_mail = New MailMessage()
            e_mail.From = New MailAddress("No Reply", "noreply@infomail.com")
            e_mail.To.Add("aravind@gmail.com")
            e_mail.Subject = "Please ignore is ,Testing Email Sending !"
            e_mail.IsBodyHtml = False
            e_mail.Body = "Please ignore is ,Testing Email Sending !"
            Smtp_Server.Send(e_mail)
            MsgBox("Mail Sent")

        Catch error_t As Exception
            MsgBox(error_t.ToString)
        End Try





我收到此错误550 5.7.60 SMTP;客户无权作为此发件人发送



我尝试过:



i尝试设置开启/关闭ssl和UseDefaultCredentials



请尽快回复我



问候

Aravind



I am getting this error "550 5.7.60 SMTP; Client does not have permissions to send as this sender"

What I have tried:

i Try to set on/off ssl and UseDefaultCredentials

pls reply me asap

Regards
Aravind

推荐答案

客户端无权发送此发件人的哪一部分难以理解?



您不能以其他人的身份从Exchange发送电子邮件。除非管理员已授予您模仿其他Exchange用户的权限。
What part of "Client does not have permissions to send as this sender" is difficult to understand?

You cannot send an email as someone else from Exchange. Not unless the admins have given you permission to impersonate someone other Exchange user.


首先,您是否拥有该域名replyinfomail.com?如果没有,则考虑欺骗/垃圾邮件并违反发件人策略框架(SPF).SMTP服务器通过遵守提议的标准RFC 7208并阻止未授权来做正确的事情用户使用域名replyinfomail.com发送电子邮件。请不要再这样做。



发件人政策框架(SPF),用于授权在电子邮件中使用域名 [ ^ ]

发件人政策框架 - 维基百科 [ ^ ]
First of all, do you own that domain "replyinfomail.com"? If not, that consider spoofing/spamming and violating the Sender Policy Framework (SPF). The SMTP server doing the right thing by compliance with proposed standard RFC 7208 and blocking unauthorized user to sent email using the domain "replyinfomail.com". Please don't do that again.

Sender Policy Framework (SPF)for Authorizing Use of Domains in Email[^]
Sender Policy Framework - Wikipedia[^]


这篇关于如何将office365的电子邮件发送为“来自地址”与凭证地址不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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