الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

مساعده في هذا الكود ضروري جدا

بدأه ashrafoon في 9 مايو 2009 · 0 رد · 318 مشاهدة · في Microsoft Visual Basic.NET
مشاركة: واتساب X فيسبوك تيليجرام
#1

  Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click  Dim mail As New MailMessage()

  Dim server As String

  If RadioButton1.Checked = True Then

  server = "mx2.hotmail.com"

  End If

  If RadioButton2.Checked = True Then

  server = "smtp.mail.yahoo.com"

  End If

  If RadioButton3.Checked = True Then

  server = "smtp.gmail.com"

  End If

  mail.To = TextBox5.Text

  mail.Cc = TextBox4.Text

  mail.Bcc = TextBox3.Text

  mail.From = TextBox1.Text

  mail.Subject = TextBox2.Text

  mail.Body = TextBox6.Text

  mail.Attachments.Add(TextBox7.Text)

  SmtpMail.SmtpServer = server

  SmtpMail.Send(mail)

  Try

  SmtpMail.Send(mail)

  MsgBox("send successfully")

  Catch ex As Exception

  MsgBox(ex.Message())

  While Not (ex.InnerException Is Nothing)

  ex = ex.InnerException

  End While

  End Try

  End Sub

يطلع السطر smtpmail.send (mail)غير صحيح

مواضيع مشابهة