السلام عليكم ورحمة الله وبركاته
اخواني انا عندي موقع وابغى اسوي فيه "اتصل بنا"
بحثت في المنتدى و الانترنت وما لقيت حل لها ... يطلع لي مسج :
Couldn't access to 'CDO.Message' object >> The transport Failed to connect to the server
مع العلم انه الـ SMTP Server صحيح .
Dim msg As New MailMessage
msg.Subject = "web mail"
msg.From = txtEmail.Text
msg.To = "ahmed.Ahmed@Company.com.sa"""
msg.Body = "Name : " + txtName.Text & vbCrLf & "Mobile # : " + txtMobile.Text & vbCrLf & "Phone # : " + txtPhone.Text & vbCrLf & "Email : " + txtEmail.Text & vbCrLf & "City : " + lldCity.SelectedValue
msg.BodyFormat = MailFormat.Text
msg.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
msg.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
msg.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'whether using authentication on server
msg.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
msg.UrlContentBase = "http://www.company.com.sa"
msg.UrlContentLocation = "http://www.company.com.sa"
msg.Priority = Mail.MailPriority.High
Mail.SmtpMail.SmtpServer = "212.71.41.632"
Mail.SmtpMail.Send(msg)انا جربت الكود على Local SMTP Server وظبط معاي بس لما احطه على Public SMTP Server يطلعلي المسج اللي ذكرته لكم . وبعض الاحيان يقولي "تم الاسال بنجاح" بس ما ارسل شي !!!!
ارجو منكم المساعدة :( :(
في اسرع وقت ممكن :)