SMTP access to personal domain email using Asp.net mvc

Sang Yong Jin 1 Reputation point
2022-04-26T20:15:11.917+00:00

Hi,

I have question for Smtp using my company domain based on outlook.

I tried to setup Smtp using C# but not working..

The error message said "System.Net.Mail.SmtpException: 'Transaction failed. The server response was: 5.2.252 SendAsDenied; sangyong@personaldomain.com not allowed to send as DoNotReply@localhost;"

my Webconfig code is below:

<network host="smtp.live.com" port="587" userName="sangyong@personaldomain.com" password="Password" defaultCredentials="false" enableSsl="true" />

Please tell me which server host should I use it?

I tried to use a lot of server URL, but not working..

smtp-mail.outlook.com

smtp.live.com

I am really frustrated now.. please help..

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,281 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Jose Zero 576 Reputation points
    2022-04-30T01:40:34.3+00:00

    Too many years ago a Mail Server was able t accept mail from any sender, later due bad use and lots of spams, SMTP Mail Servers changed to accept only mails from same domain.
    If you are an authenticated user and trying to post a message where sender is from same domain it should accept your message and place it on Server Outbox Queue. So as soon as possible it will be processed and delivered.

    0 comments No comments