SMTP send email failure by SmtpClinet (SmarterEmail server)

Sends an email message to an SMTP server for delivery. These methods block while the message is being transmitted.

SMTP send email failure by SmtpClinet (SmarterEmail server)

Are you doing this from home? A lot of ISPs block outgoing port 25.

In smartermail you can add a SMTP listener for another port. Try adding one for 587, and see if you can connect to it (assuming you have admin rights to do this).

I have configured and running SmarterEmail server, running SMTP service for 25 port, configured email account.

I've created simple .NET application to send email by my Email server, it is really simple:

        public void SendEmail(EmailMessage message, string username, string password, string host, int port, bool enableSsl)
    {
        MailMessage mm = new MailMessage(message.From, message.To, message.Subject, message.Message);
        NetworkCredential credentials = new NetworkCredential(username, password);

        SmtpClient sc = new SmtpClient(host, 25);
        sc.DeliveryMethod = SmtpDeliveryMethod.Network;
        sc.UseDefaultCredentials = false;
        sc.EnableSsl = enableSsl;
        sc.Credentials = credentials;

        sc.Send(mm);
    }

Click Here to Visit

What's Your Reaction?

like
0
dislike
0
love
0
funny
0
angry
0
sad
0
wow
0