![]() |
|
|
#1 (permalink) |
|
Kıdemli Astsubay
![]() ![]() |
VB.net ile E-Mail Gönderimi VB.net ile E-Mail Gönderimi
VB.net ile e-MAİL gönderimi Programınızda e-mail formu oluşturun. Imports System.Web.Mail Public Class email Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents TextBox2 As System.Windows.Forms.TextBox Friend WithEvents TextBox3 As System.Windows.Forms.TextBox Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents Button2 As System.Windows.Forms.Button Friend WithEvents linkben As System.Windows.Forms.LinkLabel <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.Label1 = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label() Me.Label3 = New System.Windows.Forms.Label() Me.TextBox2 = New System.Windows.Forms.TextBox() Me.TextBox3 = New System.Windows.Forms.TextBox() Me.Button1 = New System.Windows.Forms.Button() Me.Button2 = New System.Windows.Forms.Button() Me.linkben = New System.Windows.Forms.LinkLabel() Me.SuspendLayout() ' 'Label1 ' Me.Label1.AutoSize = True Me.Label1.******** = New System.Drawing.Point(6 40)Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(118 13)Me.Label1.TabIndex = 0 Me.Label1.Text = "Gideceği e-Mail Adresi" ' 'Label2 ' Me.Label2.AutoSize = True Me.Label2.******** = New System.Drawing.Point(80 64)Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(37 13)Me.Label2.TabIndex = 1 Me.Label2.Text = "Konu :" ' 'Label3 ' Me.Label3.AutoSize = True Me.Label3.******** = New System.Drawing.Point(8 92)Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(35 13)Me.Label3.TabIndex = 2 Me.Label3.Text = "label3" ' 'TextBox2 ' Me.TextBox2.******** = New System.Drawing.Point(120 61)Me.TextBox2.Name = "TextBox2" Me.TextBox2.Size = New System.Drawing.Size(256 20)Me.TextBox2.TabIndex = 4 Me.TextBox2.Text = "" ' 'TextBox3 ' Me.TextBox3.******** = New System.Drawing.Point(3 110)Me.TextBox3.Multiline = True Me.TextBox3.Name = "TextBox3" Me.TextBox3.Size = New System.Drawing.Size(376 248)Me.TextBox3.TabIndex = 5 Me.TextBox3.Text = "" ' 'Button1 ' Me.Button1.******** = New System.Drawing.Point(222 365)Me.Button1.Name = "Button1" Me.Button1.TabIndex = 6 Me.Button1.Text = "Button1" ' 'Button2 ' Me.Button2.DialogResult = System.Windows.Forms.DialogResult.Cancel Me.Button2.******** = New System.Drawing.Point(305 365)Me.Button2.Name = "Button2" Me.Button2.TabIndex = 7 Me.Button2.Text = "Kapat" ' 'linkben ' Me.linkben.ActiveLinkColor = System.Drawing.Color.Blue Me.linkben.AutoSize = True Me.linkben.Font = New System.Drawing.Font("Tahoma" 8.25! System.Drawing.FontStyle.Bold System.Drawing.GraphicsUnit.Point CType(162 Byte))Me.linkben.LinkColor = System.Drawing.Color.Red Me.linkben.******** = New System.Drawing.Point(128 40)Me.linkben.Name = "linkben" Me.linkben.Size = New System.Drawing.Size(99 14)Me.linkben.TabIndex = 9 Me.linkben.TabStop = True Me.linkben.Text = "hbilal@ymyo.net" ' ' Me.AcceptButton = Me.Button1 Me.AutoScaleBaseSize = New System.Drawing.Size(5 13)Me.CancelButton = Me.Button2 Me.ClientSize = New System.Drawing.Size(384 392)Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.linkben Me.Button2 Me.Button1 Me.TextBox3 Me.TextBox2 Me.Label3 Me.Label2 Me.Label1})Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWind ow Me.Name = "email" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParen t Me.Text = "E-mail Gönder" Me.ResumeLayout(False) End Sub #End Region Private Sub email_Load(ByVal sender As System.Object ByVal e As System.EventArgs) Handles MyBase.LoadTextBox2.Text = "" TextBox3.Text = "" Label1.Text = "Gideceği e-Mail Adresi" Label2.Text = "Konu" Label3.Text = "Mesaj Metni" Button1.Text = "Gönder" End Sub Private Sub Button1_Click(ByVal sender As System.Object ByVal e As System.EventArgs) Handles Button1.ClickDim mes As New MailMessage() mes.To = linkben.Text mes.From = "hbilal@ymyo.net" mes.subject = TextBox2.Text mes.body = TextBox3.Text mes.bodyformat = mailformat.text SmtpMail.SmtpServer = "mail.ymyo.net" 'BU KISIMA MAİL SERVER ADINI YAZIN SmtpMail.Send(mes) MsgBox("e-MAİL Başarıyla Gönderildi!!!" MsgBoxStyle.Information "GÖNDERME MESAJI")Try Catch a As Exception MsgBox("e-MAİL GÖNDERİLEMEDİ!!!" MsgBoxStyle.OKOnly)End Try End Sub Private Sub Button2_Click(ByVal sender As System.Object ByVal e As System.EventArgs) Handles Button2.ClickMe.Close() End Sub End class |
|
|
|
![]() |
| Etiketler |
| • Handles Button1 vb net • ymyo genel hukuk soru ve cevapları • vbnet body mail gönderme |
| Konuyu Toplam 1 Üye okuyor. (0 Kayıtlı üye ve 1 Misafir) | |
| Seçenekler | |
| Stil | |
|
|
Benzer Konular
|
||||
| Konu | Konuyu Başlatan | UslanmaM | Cevaplar | Son Mesaj |
| Olay!!İstediğin mail adresinden istediğin mail adresine istediğini gönder!! | kralmarkus | Messenger & İcq | 16 | 05-06-2008 09:48 AM |
| Visual Basic'te bir mail sunucusuna bağlanmak, mail atmak ve almak | CENGiZ1 | visual basic | 2 | 03-16-2008 11:07 PM |
| EXiR | Deneme, Hikaye | 0 | 04-09-2007 01:17 PM | |
| FERHATCAN | Fıkralar | 0 | 12-22-2006 10:25 PM | |