PDA

View Full Version : [Help]How to make a E-mail vb2008



neophyte
04-26-2009, 01:28 PM
Hello everybody,
that to help me plz :popconrzbitch

ok .. i want creat

a TextBox...and one Button For send to E-mail the TextBox


Sub MainEvents()

Try
Dim MyMailMessage As New MailMessage()
MyMailMessage.From = New MailAddress("You E-mail")
MyMailMessage.To.Add("You E-mail")
MyMailMessage.Subject = "Test"
MyMailMessage.Body = textbox2.Text
Dim SMPT As New SmtpClient("smtp.You E-mail")
SMPT.Port = 587
SMPT.EnableSsl = True
SMPT.Credentials = New System.Net.NetworkCredential("you E-mail", "you password")
SMPT.Send(MyMailMessage)
TextBox1.Text = "ok send"
Catch ex As Exception
End Try
End Sub

I have no error .. but when I want to send E-mail it does no work..


Thx For Help!

Sry i speak bad english.

Gravity17
04-26-2009, 05:13 PM
I don't think SMPT works anymore in visual basic if im not mistaking, ill check it out later
- Gravity17

neophyte
04-28-2009, 08:09 AM
ok Thx man!

--------
I have another question

so I would like my program have the option to be visible or invisible

i Addon a Button and 2 click for code



Me.Visible = False
Me.Hide()


It works for that it is invisible.....

but to make it visible I can not ..

I would like to add F10 (invisible)
and F11 (Visible)..


You can Help me ? Thx

neophyte
05-02-2009, 03:05 AM
Ok. I have found my Error Now

The E-mail .....Is correct!

i can send E-mail..

Now<How i can Addon a Attachments>


I have


Imports System.Net.Mail.Attachment
and in Timer

MyMailMessage.Attachments.Add(attachFile)

Now i Totaly Lost How i can addon it...





*Sry bad english!!!!*

Chimpen
05-03-2009, 10:31 AM
To find you SMTP server go to this site: http://www.e-eeasy.com/SMTPServerList.aspx