i.mesaj System.Net.Mail.SmtpException: Posta gönderme hatası. ---> System.Net.WebException: Uzak ad çözülemedi: 'smpt.gm

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
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

Post by answerhappygod »

I Mesaj System Net Mail Smtpexception Posta Gonderme Hatasi System Net Webexception Uzak Ad Cozulemedi Smpt Gm 1
I Mesaj System Net Mail Smtpexception Posta Gonderme Hatasi System Net Webexception Uzak Ad Cozulemedi Smpt Gm 1 (114.43 KiB) Viewed 16 times
this is my code:
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)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply