i.mesaj System.Net.Mail.SmtpException: Posta gönderme hatası. ---> System.Net.WebException: Uzak ad çözülemedi: 'smpt.gm
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
i.mesaj System.Net.Mail.SmtpException: Posta gönderme hatası. ---> System.Net.WebException: Uzak ad çözülemedi: 'smpt.gm
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows.Forms;using System.Net;using System.Net.Mail;namespace boyaci{ public partial class mesaj : Form { public mesaj() { InitializeComponent(); } private void mesaj_Load(object sender, EventArgs e) { } private void button1_Click(object sender, EventArgs e) { try { string from = "[email protected]"; string password = "Mypassword"; MailMessage msg = new MailMessage(); msg.Subject = textBox3.Text; msg.From = new MailAddress(from); msg.Body = textBox4.Text; msg.To.Add(new MailAddress(textBox2.Text)); SmtpClient smpt = new SmtpClient(); smpt.Host = "smpt.gmail.com"; smpt.Port = 587; smpt.UseDefaultCredentials = false; smpt.EnableSsl = true; NetworkCredential nc = new NetworkCredential(from, password); smpt.Credentials = nc; smpt.Send(msg); MessageBox.Show(""); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } } }}
im asking how to fix this problem
i.mesaj System.Net.Mail.SmtpException: Posta gönderme hatası. ---> System.Net.WebException: Uzak ad çözülemedi: 'smpt.gmail.com konum: System.Net.Service Point.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6) konum: System.Net. Pooled Stream.Activate(Object owningObject, Boolean async, GeneralAsyncDelegate asyncCallback) konum: System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout) konum: System.Net.Mail.SmtpConnection.GetConnection(Service Point servicePoint) konum: System.Net.Mail.SmtpClient.GetConnection() www. www konum: System.Net.Mail.SmtpClient.Send(MailMessage message) - Iç özel durum yığını izlemesinin sonu konum: System.Net.Mail.SmtpClient.Send(MailMessage message) konum: boyaci.mesaj.button1_Click(Object sender, EventArgs e)