Hi i am doing application in asp.net
I want to send mail .I am sending mail using cdonts.When i execute my page its not giving any erroe message but i am not receiving any mail.Can i send mail to any domains(like yahoo ect) using cdonts?My code is below.Pl help me.
Imports System.Web.Mail
Imports CDONTS.NewMailClass
Dim ObjMail As CDONTS.NewMail
ObjMail.From = vfrom
ObjMail.To = vto
ObjMail.Subject = "From cdonts"
ObjMail.Body = "test"
ObjMail.Send()
ObjMail = Nothing
Response.Write("mail sent")
when i try to send using smtp i am getting below error
System.Runtime.InteropServices.COMException: The transport failed to connect to the server
my code is
Dim objMail As New MailMessage
objMail.From = vfrom
objMail.To = "
[email protected]"
objMail.Priority = MailPriority.High
objMail.Subject = "from smpt"
objMail.Body = "This is my first email sent via "
SmtpMail.SmtpServer = "SMTP.email.dupont.com"
SmtpMail.Send(objMail)
thanks