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

ارسال email

بدأه كارم سامي في 2 ديسمبر 2013 · 1 رد · 329 مشاهدة · في Microsoft Visual C#.NET
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكم ورحمة الله وبركاته

 

احاول انشاء form للأتصال بنا واستخدم هذا الكد ولكن لا افهم ما المقصود باليوزنيم والباسود (هنا ادخلت اسم المستخدم للحساب المرسل منه الرسالة والباسورد الخاص به )

كما انني اجد الكثير من الاهطاء تظهر مثل time out

او faild

او Transaction failed. The server response was: Transaction failed :  Cannot send message due to possible abuse; please visit http://postmaster.yahoo.com/abuse_smtp.html for more information

string smtpAddress = "smtp.mail.yahoo.com";
            int portNumber = 587;
            bool enableSSL = true;

            string emailFrom = textBox1.Text;
            string password = "abcdefg";
            string emailTo = "to@yahoo.com";
            string subject = comboBox1.Text + textBox4.Text + "Jep MData 1.0.0.0";
            string body = richTextBox1.Text + 
                          "-------------------------------------------------" +
                          textBox1.Text + "---------" + textBox2.Text + "---------" + textBox3.Text;

            using (MailMessage mail = new MailMessage())
            {
                mail.From = new MailAddress(emailFrom);
                mail.To.Add(emailTo);
                mail.Subject = subject;
                mail.Body = body;
                mail.IsBodyHtml = false;
                // Can set to false, if you are sending pure text.

             //   mail.Attachments.Add(new Attachment("C:\\SomeFile.txt"));
           //    mail.Attachments.Add(new Attachment("C:\\SomeZip.zip"));

                using (SmtpClient smtp = new SmtpClient(smtpAddress, portNumber))
                {
                    smtp.Credentials = new NetworkCredential(emailFrom, password);
                    smtp.EnableSsl = enableSSL;
                    smtp.Send(mail);
                }
            }
#2

أخي الفاضل

ارسال ايميل عن طريق V.S تمت مناقشته في أكثر من مناسبه في المنتدي لذلك اتمني ان تستخدم البحث في المنتدي أو جوجل وان شاء الله تصل للاجابه

certifiedj.jpg

 

 

Image Hosted by ImageShack.us

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