• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.

Issue sending email using c#

hamoon

New Pleskian
i'm trying to send an email using the code below :

Code:
SmtpClient smtpClient = new SmtpClient();
            MailMessage message = new MailMessage();

            MailAddress fromAddress = new MailAddress("[email protected]", "From Name");

       
            smtpClient.Host = "mail.jabe-abzar.com";

         
            smtpClient.Port = 25;

            NetworkCredential info = new NetworkCredential("[email protected]", "my pass");
            smtpClient.DeliveryMethod = SmtpDeliveryMethod.Network;
            smtpClient.UseDefaultCredentials = false;
            smtpClient.Credentials = info;

         
            message.From = fromAddress;

       
            message.To.Add("[email protected]");
            message.Subject = "Your subject";

         

         
            message.IsBodyHtml = false;

     
            string ss_body = "body of email is here";
            message.Body = ss_body;

       


            smtpClient.Send(message);

but i'm getting "{"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 185.159.152.16:25"}" error on last line " smtpClient.Send(message);;".
is there any settings that i should do in my panel?
is this even the right way to send an email?
 
Back
Top