OK, so, in Visual Basic, I was programming an e-mail program...
Here's the code. It can't seem to send it. I get an error every time I click send.
Imports System.Net.Mail
Public Class MailSender
Dim mail As New MailMessage
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim stmpclient As New SmtpClient
stmpclient.Credentials = New Net.NetworkCredential(My.Settings.Username, My.Settings.Password)
stmpclient.Port = 587
stmpclient.Host = "stmp.gmail.com"
stmpclient.EnableSsl = True
mail = New MailMessage
mail.From = New MailAddress(TextBox2.Text)
mail.To.Add(New MailAddress(TextBox1.Text))
mail.Subject = TextBox3.Text
mail.Body = TextBox4.Text
stmpclient.Send(mail)
End Sub
End ClassOffline
BWOG wrote:
Visual Basic looks a lot harder then I thought...
Is it that Microsoft one?
Its not really that hard once you know what to do.
Offline
markyparky56 wrote:
BWOG wrote:
Visual Basic looks a lot harder then I thought...
Is it that Microsoft one?Its not really that hard once you know what to do.
it's supposed to be basic...
Offline
I've tried an email sender. If I could get mine to work I would know how to help you.
My site Offline