i've created an email app within a WPF but the program times out, i've tried it a few ways with different smtp clients and domains with no luck, please could someone shine some light on where i might be going wrong
[CODE] using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; using System.Xml; using System.Net.Mail; namespace Email_test { /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); } private void button1_Click(object sender, RoutedEventArgs e) { MailMessage mail = new MailMessage(textBox1.Text, textBox2.Text, textBox3.Text, textBox4.Text); System.Net.NetworkCredential auth = new System.Net.NetworkCredential("my@gmail", "mypassword", "gmail.com"); SmtpClient client = new SmtpClient("smtp.gmail.com",587); client.EnableSsl = false; client.UseDefaultCredentials = false; mail.IsBodyHtml = true; client.Credentials = auth;
I tried to get the latest secureboot certificate for my old Dell 7010 Optiplex machine.
I restored the default settings to Secure Boot. Big mistake.
Now when secure boot is on. The machine doesn't boot and complains about no booting devises.
The computer's secure boot can't find where to boot and the information apparently has to be entered manually.
Secureboot's settings are now years old and it can't find a new configuration.
What could be done here?
There are plenty of files to choose from in the secureboot menu, but I don't know what to put there for each of the four
Windows 11 upgraded from 10..... originally who knows what (used machine)
They need to follow the standard for AAA game but they will go at lowest level for triple a game because will sell more, earn kudos and the milk it for years anyway.
look how much they milked gta 5 and how they milked the original 3 - San Andreas and vice city.
it is probably going to be a fun game but then they allowed someone to remake classics that somehow were more broken and worse then original
i hope they don’t ###### up this one!!!
In addition to the "sidebar app list" and "Collections" features, Microsoft will also deprecate the "Drop" feature. Before you publish this news and credit another site, here is the original source:
https://x.com/i/status/2067838711870439583
.
Question
Sarkhan Vol
i've created an email app within a WPF but the program times out, i've tried it a few ways with different smtp clients and domains with no luck, please could someone shine some light on where i might be going wrong
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Xml;
using System.Net.Mail;
namespace Email_test
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
private void button1_Click(object sender, RoutedEventArgs e)
{
MailMessage mail = new MailMessage(textBox1.Text, textBox2.Text, textBox3.Text, textBox4.Text);
System.Net.NetworkCredential auth = new System.Net.NetworkCredential("my@gmail", "mypassword", "gmail.com");
SmtpClient client = new SmtpClient("smtp.gmail.com",587);
client.EnableSsl = false;
client.UseDefaultCredentials = false;
mail.IsBodyHtml = true;
client.Credentials = auth;
try {
client.Send(mail);
MessageBox.Show("Success" + Environment.NewLine + "Emai sent", "Close", MessageBoxButton.OK);
}
catch
{
MessageBox.Show("Error" + Environment.NewLine + "Email was not sent", "try again", MessageBoxButton.OK);
}
}
}
}
[/CODE]
Link to comment
https://www.neowin.net/forum/topic/1128656-email-from-wpf-c/Share on other sites
4 answers to this question
Recommended Posts