inner exception reads:
Unable to read data from the transport connection: net_io_connectionclosed.
Deliver email message via membership provider using VS & Local server
I have setup the Login Wizard to send a Email message and wondering how to test operation delivery. Is it possible to send a message to my Email address at Yahoo.co.uk using personal credentials to login and read message? when run from my development server attached to VS.
-
peter liles 556 Reputation points
2021-07-27T16:15:49.447+00:00
8 additional answers
Sort by: Most helpful
-
peter liles 556 Reputation points
2021-07-26T11:43:13.077+00:00 I have utilized a ready made web form script on a aspx page, written in C# and run from VS when connected to internet for test purposes. My actual project is written in VB.NET and i could not get it to work when set maildefinition attribute in asp: CreateUserWizard.
This is my script that i follow and operated from VSDE.public static void Email(string htmlString)
{
try
{
MailMessage message = new MailMessage();
SmtpClient smtp = new SmtpClient();
message.From = new MailAddress("dog@réalisations .co.uk");
message.To.Add(new MailAddress("peter@réalisations .co.uk"));
message.Subject = "Test";
message.IsBodyHtml = true; //to make message body as html
message.Body = htmlString;
smtp.Port = 587;
smtp.Host = "smtp.mail.yahoo.com";
smtp.EnableSsl = true;
smtp.UseDefaultCredentials = false;
smtp.Credentials = new NetworkCredential("dog@réalisations .co.uk", "Testbedscript");
smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
smtp.Send(message);
}
catch (Exception) { }
} -
peter liles 556 Reputation points
2021-07-28T14:17:06.893+00:00 I am not clued up about SMTP server so visited my internet based Yahoo account home page that does not seem to have a IP reference number at hand?
As i understand the SMTP is a separate mail server that i don't have access to? am i correct. So how may i collect such detail information as IP address.
When i visited my yahoo account i read help page info regarding IMAP incoming mail settings and SMTP outgoing mail applicable to third party apps such as Outlook . I guess these are not relevant to what i need. There is no mention about connecting directly from software like VS. -
peter liles 556 Reputation points
2021-07-29T19:21:11.59+00:00 I have tried various means and still unable to connect to mail server. I did setup outlook and attached to my yahoo account thinking i could use those login details instead but it uses the same credential data as yahoo apart from the app password. When tested it gave me an error message about certification and authentication.
I think the only solution left is to try an alternative mail provider like GMAIL which i understand is better equip and seems a common example in use. I have come across examples that utilize Nuget packages such as spire?Thanks again
-
peter liles 556 Reputation points
2021-07-29T20:50:18.52+00:00 I finally got it to work ! It took me a day to find where to update the host settings and then utilize the correct script because i had various sets of code examples and only one version finally worked?
Now all i need is to retrieve an email ??Thanks