try { MailMessage message = new MailMessage(); SmtpClient smtp = new SmtpClient(); message.From = new MailAddress("[email protected]"); message.To.Add(new MailAddress("[email protected]")); message.Subject = "Test"; message.Body = "Content"; smtp.Port = 465; smtp.Host = "smtp.gmail.com"; smtp.EnableSsl = true; smtp.UseDefaultCredentials = false; smtp.Credentials = new NetworkCredential("[email protected]", "pwd"); smtp.DeliveryMethod = SmtpDeliveryMethod.Network; smtp.Send(message); } catch (Exception ex) { MessageBox.Show("err: " + ex.Message); }
MailMessage myMail = new MailMessage(); myMail.To = "[email protected]"; myMail.From = "[email protected]"; myMail.Subject = "My Subject"; myMail.BodyFormat = MailFormat.Text; myMail.Body = "My Body & Description"; SmtpMail.Send(myMail); myMail = null; this.lblText.Text = "Mail Sending.";
MailMessage mail = new MailMessage(); mail.From = new MailAddress("[email protected]"); mail.To.Add("[email protected]"); mail.Subject = "Welcome to Writely"; mail.Body = "Test content"; SmtpClient smtp = new SmtpClient("smtp.gmail.com",587); smtp.EnableSsl = true; smtp.Send(mail); MessageBox.Show("ส่งอีเมล์เรียบแล้ว", "ส่งอีเมล์", MessageBoxButtons.OK, MessageBoxIcon.Information);
<system.net> <mailSettings> <smtp> <network host="smtp.xxx.com" password="" userName=""/> </smtp> </mailSettings> </system.net>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง