Code:Dim client As New Net.Mail.SmtpClient("smtp.gmail.com")
Dim mm As New Net.Mail.MailMessage("M...@MyDomain.Com",
"Y...@YourDomain.com")
mm.Body = "<h1>Hello World</h1>"
Dim client As New Net.Mail.SmtpClient("mail.MyDomain.com")
client.Credentials = New Net.NetworkCredential("MyUserName",
"MyPassword")
client.Send(mm)
Now , I have made an app (LIKE SMTP MAIL CLIENT) that takes user's
username and password to send e-mails.. But, The problem is that if
the user (by mistake!) enters worng id or password then My app returns
an error only when the user tries to send the email ! But what i want
is to make is a login at "statup" so user enters id and password at
startup and my app tries to LOGIN to the server and if id or password
is wrong then my app will shows the error of wrong information at just
on the startup (Not while send e-mails - - like most of messangers
have !)
I tries very much but can't find anyting (Something Like client.login
like I used client.Send(mm) !! )
Any Idea ??
Regards,
Dan
See
http://sholliday.spaces.live.com/blog/
2/8/2006
Smarter Email/Smtp setup with DotNet Configuration Sections (1.1 and 2.0)
to read about the authentication methods, and download code samples.
<dans...@gmail.com> wrote in message
news:1178814916.3...@o5g2000hsb.googlegroups.com...