I want to open the users default email app with the recipients name and the subject ready for them to fill in the message and then send, by clicking a picture box. How?
Any help would be appreciated :D
Printable View
I want to open the users default email app with the recipients name and the subject ready for them to fill in the message and then send, by clicking a picture box. How?
Any help would be appreciated :D
Public Class Form1
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
#End Region
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim tx_Email As String
tx_Email = "[email protected]"
System.Diagnostics.Process.Start("mailto:[email protected]?subject=Hi!")
End Sub
End Class
I found this, but it just sends an email, I want to launch the default email app.
Quote:
First , add a ref "web.dll" then everything should works fine.
VB Code:
Imports System.Web.Mail Dim m As New System.Web.Mail.MailMessage() With m .From = "[email protected]" .To = "myself$my.house" .Subject = "My SMTP Test" .Body = "My New Message" End With SmtpMail.SmtpServer = "MyServerName" SmtpMail.Send(m)
Ah, crossed posts! thanks Iouri, i've whittled it down to just:
VB Code:
System.Diagnostics.Process.Start("mailto:[email protected]?subject=Hi!")