Quantcast
Channel: Security
Viewing all articles
Browse latest Browse all 4737

Cannot send mails to outside email addresses..

$
0
0

I need to send Email from my webpage when the manager approves a request.the send address and to address is taken from the database.My issue is that i can sent the mail only to the company emil adresses  ie,the emil id's which ends in @log-ram.com.I cant send it to outside email id's like gmail and yahoo.relay denied error is coming.Can anyone tell me the olution.Is it the problem with my system SMTP server.How can i correct it. Below is my function to send the mail.

Public SharedSub sendmail(ByVal strto AsString,ByVal strfrom AsString,ByVal strsub AsString,ByVal strbody AsString)

Dim objfrom AsNewMailAddress(strfrom)

Dim objto AsNewMailAddress(strto)

Dim objmail AsNewMailMessage(objfrom, objto)

objmail.Body = strbody

objmail.Subject = strsub

objmail.DeliveryNotificationOptions =DeliveryNotificationOptions.OnFailure
objmail.IsBodyHtml =True

Dim objsmtp AsNewSmtpClient()

objsmtp.Credentials =New System.Net.NetworkCredential("databaseadmin@log-ram.com","&dmiN1")

objsmtp.Port = 25

 objsmtp.Host ="smtp20a.serverdata.net"

objsmtp.Send(objmail)

EndSub


Viewing all articles
Browse latest Browse all 4737

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>