- 0
سجل دخول لمتابعه هذا
متابعين
0

سؤال: ما هي وظيفة Timeout
بواسطة
maayah,
-
يستعرض القسم حالياً 0 members
لا يوجد أعضاء مسجلين يشاهدون هذه الصفحة .
بواسطة
maayah,
لا يوجد أعضاء مسجلين يشاهدون هذه الصفحة .
تم النشر منذ
السلام عليكم ورحمة الله وبركاته
في الكود الذي نستخدمه لإرسال بريد الكتروني
توجد الوضيفة التالية Timeout لماذا تستخدم؟
Imports System.Net.Mail
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
Dim Port As Integer = "25"
Dim userName As String = "[email protected]"
Dim passWord As String = "mypassword"
Dim msgMail As MailMessage
Dim smtp As SmtpClient
msgMail = New MailMessage("[email protected]", "[email protected]", "Subject", "Body")
smtp = New SmtpClient("smtp.mail.com", Port)
' smtp.Timeout = 100 ???
smtp.EnableSsl = True
smtp.DeliveryMethod = SmtpDeliveryMethod.Network
smtp.Credentials = New System.Net.NetworkCredential(userName, passWord)
smtp.Send(msgMail)
MessageBox.Show("Sent!", "Sent", MessageBoxButtons.OK, MessageBoxIcon.Information)
Catch ex As Exception
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.None)
End Try
End Sub
End Class
مع شكري للجميع ...
شارك هذا الرد
رابط المشاركة
شارك الرد من خلال المواقع ادناه