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;
A McDonald's restaurant uses about 1.5 to 2 million gallons of water per year for operations like food preparation, cleaning, and restrooms. That is a lot less than the 2,083 gallons of water per megawatt hour mentioned above.
Turbo Pascal
Original authorAnders Hejlsberg (at Borland)
DeveloperBorland
Release20 November 1983; 42 years ago[1][2]
Operating systemCP/M, CP/M-86, MS-DOS, Windows 3.x, Classic Mac OS
PlatformZ80, x86, 68000, PC-98
https://en.wikipedia.org/wiki/Turbo_Pascal
It was the one language I actually learned to program in. I wasn't very good at it and never used it at work.
If anyone has any personal Turbo Pascal stories or personal accomplishments using it, please take a moment to share. Thanks. Peace
Underpowered and overpriced, both separately and together.
This is to be taken as a "1st gen" (Linux+Proton based), and to wait for the 2nd gen that hopefully is a bit better value/balanced. Or wait for a sale.
The Korean company said that UFS 5.0 integrates the latest embedded memory interface standard from JEDEC and achieves up to 10.8 gigabytes per second (GB/s) transfer speeds. Regarding write speeds, Samsung UFS 5.0 can reach 9.5 GB/s.
ISTM that those are pretty fast speeds for local mobile storage.
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