sending email through asp.net 1.1
-
hey i've folling code running but there is an error : Imports DotNetOpenMail Imports DotNetOpenMail.Logging Imports DotNetOpenMail.Encoding Imports DotNetOpenMail.Resources Imports DotNetOpenMail.SmtpAuth Dim emailMessages As New EmailMessage emailMessages.FromAddress = New EmailAddress("atif.kabhikabhi@gmail.com", "Atif") emailMessages.AddToAddress(New EmailAddress("kabhikabhi.atif@gmail.com")) emailMessages.Subject = "Salam" emailMessages.HtmlPart = New HtmlAttachment("
Write Down some BODY-Text here
") Dim smtpservv As SmtpServer smtpservv = New SmtpServer("smtp.gmail.com", 465) smtpservv.SmtpAuthToken = New SmtpAuthToken("atif.kabhikabhi@gmail.com", "aasmaan") emailMessages.ContentType = "TEXT/HTML" emailMessages.Send(smtpservv) Response.Write("Email Sent Successfully") n the error is "there is no such host" can any buddy help me thnx in advance..
-
hey i've folling code running but there is an error : Imports DotNetOpenMail Imports DotNetOpenMail.Logging Imports DotNetOpenMail.Encoding Imports DotNetOpenMail.Resources Imports DotNetOpenMail.SmtpAuth Dim emailMessages As New EmailMessage emailMessages.FromAddress = New EmailAddress("atif.kabhikabhi@gmail.com", "Atif") emailMessages.AddToAddress(New EmailAddress("kabhikabhi.atif@gmail.com")) emailMessages.Subject = "Salam" emailMessages.HtmlPart = New HtmlAttachment("
Write Down some BODY-Text here
") Dim smtpservv As SmtpServer smtpservv = New SmtpServer("smtp.gmail.com", 465) smtpservv.SmtpAuthToken = New SmtpAuthToken("atif.kabhikabhi@gmail.com", "aasmaan") emailMessages.ContentType = "TEXT/HTML" emailMessages.Send(smtpservv) Response.Write("Email Sent Successfully") n the error is "there is no such host" can any buddy help me thnx in advance..
I would guess that it is having trouble resolving the smtp.gmail.com, so you might need to put in the IP address. The port is also not that standard smtp port. Normally it is 25. Hope that helps. Ben
-
I would guess that it is having trouble resolving the smtp.gmail.com, so you might need to put in the IP address. The port is also not that standard smtp port. Normally it is 25. Hope that helps. Ben
hey thnx but after making changes the only thing changes is the error. now i get the error "The message could not be sent to the SMTP server. The transport error code was 0x800ccc15. The server response was not available "
-
hey thnx but after making changes the only thing changes is the error. now i get the error "The message could not be sent to the SMTP server. The transport error code was 0x800ccc15. The server response was not available "
Hi, the SMTP mail is blocked by the virus scan. so follow this step and check it out . go to VirusScan Console - Right-click Access Protection - Click "Properties" - Go to Port-Blocking tab - Select Rule: "Prevent mass mailing worms from sending mail" - Click Edit (in order to edit this rule) - Add "aspnet_wp.exe" to the exclusion list Other products such as Norton and other antiviral or firewall software may cause the same issue, but I'll bet the underlying issue is the same. Hope this helps others out there.
With Regards, Sakthi
-
hey thnx but after making changes the only thing changes is the error. now i get the error "The message could not be sent to the SMTP server. The transport error code was 0x800ccc15. The server response was not available "