SENT: 530 SMTP authentication is required to external receipient
Posted: 2016-01-17 09:49
I am trying to send email to external recipient using my hMail Server email address. I have written code in c#. Code also deployed IIS website where same server hmail server exists. So code and email server on the same server.
If I send to my hmailserver domain (I mean my domain) it works. Only if I am trying to send email external id using my smtp server. it is not working.
If I send to my hmailserver domain (I mean my domain) it works. Only if I am trying to send email external id using my smtp server. it is not working.
"SMTPD" 2956 5864 "2016-01-17 01:29:04.698" "192.168.1.254" "SENT: 220 Welcome message from SMTP"
"SMTPD" 2428 5864 "2016-01-17 01:29:04.700" "192.168.1.254" "RECEIVED: EHLO COWBOYS"
"SMTPD" 2428 5864 "2016-01-17 01:29:04.701" "192.168.1.254" "SENT: 250-[nl]250-SIZE 20480000[nl]250-AUTH LOGIN[nl]250 HELP"
"SMTPD" 2468 5864 "2016-01-17 01:29:04.703" "192.168.1.254" "RECEIVED: MAIL FROM:<fromemail@gmail.com>"
"SMTPD" 2468 5864 "2016-01-17 01:29:04.710" "192.168.1.254" "SENT: 250 OK"
"SMTPD" 2956 5864 "2016-01-17 01:29:04.712" "192.168.1.254" "RECEIVED: RCPT TO:<externalrecipient@externalrecipientdomain.com>"
"SMTPD" 2956 5864 "2016-01-17 01:29:04.713" "192.168.1.254" "SENT: 530 SMTP authentication is required."
Code: Select all
SmtpClient client = new SmtpClient();
//client.Send(oMail);
client.Send(fromEmailId, toEmailId, subject, message);
Code: Select all
<system.net>
<mailSettings>
<smtp>
<network host="smtp.myhmaildomail.com" userName="info@myhmaildomain.com" password="password@123" port="25" />
</smtp>
</mailSettings>
</system.net>