Last post Apr 29, 2020 06:56 AM by yij sun
None
0 Points
1 Post
Apr 28, 2020 02:49 PM|Tim_369|LINK
private void buttonOtpreav_Click(object sender, EventArgs e) { SmtpClient client = new SmtpClient("smtp.mail.ru", 587); client.Credentials = new NetworkCredential("...@yandex.ru", "Password"); string from = "...@yandex.ru"; string to = "...2@yandex.ru"; string subject = "Header"; string text = "Text............"; client.Send(from,to,subject,text); }
Participant
1630 Points
930 Posts
Apr 28, 2020 10:18 PM|PaulTheSmith|LINK
The compiler never indicates Exceptions. Exceptions only happen at runtime.
You have told us what problem you do not have.
Can you tell us what problem you do have?
Contributor
3730 Points
1431 Posts
Apr 29, 2020 06:56 AM|yij sun|LINK
Hi Tim_369,
Accroding to your description,could you tell us about the details of your problems?
Besides,the SMTP server requires a secure connection.I suggest you need to make sure the connection is open.Also,you need to note connection timeout.
More details,you could refer to below article:
https://www.aspsnippets.com/Articles/GMAIL-Error-The-SMTP-server-requires-a-secure-connection-or-the-client-was-not-authenticated.aspx
Best regards,
Yijing Sun
None
0 Points
1 Post
I want that when you click on the button, a certain text is sent to the mail. The compiler indica...
Apr 28, 2020 02:49 PM|Tim_369|LINK
private void buttonOtpreav_Click(object sender, EventArgs e)
{
SmtpClient client = new SmtpClient("smtp.mail.ru", 587);
client.Credentials = new NetworkCredential("...@yandex.ru", "Password");
string from = "...@yandex.ru";
string to = "...2@yandex.ru";
string subject = "Header";
string text = "Text............";
client.Send(from,to,subject,text);
}
Participant
1630 Points
930 Posts
Re: I want that when you click on the button, a certain text is sent to the mail. The compiler in...
Apr 28, 2020 10:18 PM|PaulTheSmith|LINK
The compiler never indicates Exceptions. Exceptions only happen at runtime.
You have told us what problem you do not have.
Can you tell us what problem you do have?
Contributor
3730 Points
1431 Posts
Re: I want that when you click on the button, a certain text is sent to the mail. The compiler in...
Apr 29, 2020 06:56 AM|yij sun|LINK
Hi Tim_369,
Accroding to your description,could you tell us about the details of your problems?
Besides,the SMTP server requires a secure connection.I suggest you need to make sure the connection is open.Also,you need to note connection timeout.
More details,you could refer to below article:
https://www.aspsnippets.com/Articles/GMAIL-Error-The-SMTP-server-requires-a-secure-connection-or-the-client-was-not-authenticated.aspx
Best regards,
Yijing Sun