Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C#4.0
Hi friends
actually i found smtp address by typing ping command prompt. that adddress is and my code for sending email is
MailMessage Msg = new MailMessage();
                // Sender e-mail address.
                Msg.From = txtFrom.Text;
                // Recipient e-mail address.
                Msg.To = txtTo.Text;
                Msg.Subject = txtSubject.Text;
                Msg.Body = txtBody.Text;
                // your remote SMTP server IP.
                SmtpMail.SmtpServer = "";
                Msg = null;
                Page.RegisterStartupScript("UserMsg", "<script>alert('Mail sent thank you...');if(alert){ window.location='SendMail.aspx';}</script>");
and the error is
The message could not be sent to the SMTP server. The transport error code was 0x800ccc6f. The server response was 554 Your access to this mail system has been rejected due to the sending MTA's poor reputation. If you believe that this failure is in error, please contact the intended recipient via alternate means.
Posted 20-Mar-13 4:14am
Edited 20-Mar-13 4:16am
joshrduncan2012 at 20-Mar-13 9:20am
What is your question?
Sergey Alexandrovich Kryukov at 20-Mar-13 9:33am
I think I know. Please see my comment below :-)
Sergey Alexandrovich Kryukov at 20-Mar-13 9:33am
Do you want us to improve MTA's reputation? :-)
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

try this
MailAddress mailfrom = new MailAddress("fromaddress");
            MailAddress mailto = new MailAddress("toaddress");
            MailMessage newmsg = new MailMessage(mailfrom, mailto);
            newmsg.Subject = "subjtect";
            //txtMsg.Text = @"";
            newmsg.Body = "Body message";
            //For File Attachment, more file can also be attached
            //Attachment att = new Attachment(@"C:\Users\admin\Desktop\");
            SmtpClient smtps = new SmtpClient("", 587);
            smtps.UseDefaultCredentials = true;
            smtps.Credentials = new NetworkCredential("from address","password");
            smtps.EnableSsl = true;

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 645
1 Maciej Los 225
2 Abhinav S 171
3 Richard Deeming 160
4 Suvendu Shekhar Giri 159
0 Sergey Alexandrovich Kryukov 9,623
1 OriginalGriff 9,135
2 Peter Leow 5,042
3 Kornfeld Eliyahu Peter 3,373
4 Maciej Los 2,581

Advertise | Privacy | Mobile
Web03 | 2.8.150327.1 | Last Updated 20 Mar 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100