Rank: Newbie
Groups: Registered
Joined: 12/23/2024(UTC)
Posts: 0
Hello,
I am attempting to validate an email address using the C# code sample in a .NET 7.0 web app running on Windows IIS. The call to SmtpClient.TestRecipients fails every time with the following error:
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
My code:
Quote: SmtpMail oMail = new SmtpMail("TryIt"); SmtpClient oSmtp = new SmtpClient(); oMail->From = "thor-no-reply@targethospitality.com; oMail->To = "does-not-exist@nextwavesoftware.com"; SmtpServer oServer = new SmtpServer(""); try { oSmtp->TestRecipients(oServer, oMail); Console::WriteLine("email address was verified!"); } catch (Exception ep) { Console::WriteLine("failed to test email address with the following error:"); Console::WriteLine(ep->Message); }
Thank you for your help.
Rank: Administration
Groups: Administrators
Joined: 11/11/2010(UTC) Posts: 1,154
Thanks: 9 times Was thanked: 55 time(s) in 55 post(s)
It is likely that your outbound 25 port is blocked, in this way, there is no way to test recipient.
Rank: Newbie
Groups: Registered
Joined: 12/23/2024(UTC)
Posts: 0
Thanks for your reply, Ivan, I will give that a try.
Forum Jump
EmailArchitect Support
Email Component Development
- EASendMail SMTP Component - .NET Version
- EASendMail SMTP Component - Windows Store Apps
- EASendMail SMTP ActiveX Object
- EAGetMail POP3 & IMAP4 Component - .NET Version
- EAGetMail POP3 & IMAP4 ActiveX Object
Exchange Server and IIS SMTP Plugin
- DomanKeys/DKIM for Exchange Server and IIS SMTP
- Disclaimer and S/MIME for Exchange Server and IIS
EmailArchitect Email Server
- EmailArchitect Email Server (General)
- EmailArchitect Email Server Development
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.