|
-
Apr 10th, 2006, 05:16 AM
#1
Thread Starter
New Member
Error in sending Email Application
Hello all
I have written following code to send an email. but getting an error of
Message "Specified cast is not valid." String on the following line
SmtpMail.Send(ObjEmail)
Dim SmtpMail As SmtpMail
Dim ObjEmail As New MailMessage
SmtpMail.SmtpServer = "mail.suvana.com"
ObjEmail.BodyFormat = MailFormat.Text
ObjEmail.From = "[email protected]"
ObjEmail.Attachments.Add("C:\ajay1.pdf")
ObjEmail.To = "[email protected]"
'ObjEmail.Cc =
ObjEmail.Subject = "Test Mail From Infosys..."
ObjEmail.Body = " Hi this is Ajay"
SmtpMail.Send(ObjEmail)
SmtpMail = Nothing
ObjEmail = Nothing
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|