TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Stephen Ford
NA
5
1.8k
Unable to send email in Visual Web Developer 2010 VB
Aug 30 2012 3:55 AM
I am using Visual Web Developer 2010 and Visual Basic with NET version 4. I want to send an email from a web page I have Created. I have referenced System.Net from the Solution Explorer References page. The code runs without error but no email message is sent. Below is a copy of the code.
Imports System.Net.Mail
Protected Sub Button1_Click(sender As Object, e As System.EventArgs) Handles Button1.Click
Dim mm As New System.Net.Mail.MailMessage("my email address", "recipients email address")
mm.IsBodyHtml = True
mm.Body = "<h1>Hello World</h1>"
mm.Subject = "Test"
Dim client As New System.Net.Mail.SmtpClient("Service provider smtp address")
client.Credentials = New System.Net.NetworkCredential("my user name", "my password")
client.Send(mm)
Dispose()
End Sub
Any help or suggestions would be greatly appreciated.
Many thanks
Steve
Reply
Answers (
4
)
Assembly doesnot have a strong name error
Printing page using asp.net webservice.