Menu

ERROR - Expecting: 250. Recieved: 334

Help
OniShiro
2006-06-07
2013-04-15
  • OniShiro

    OniShiro - 2006-06-07

    Why am I getting this smtp exception error? it used to work fine on the dev machine, but on the server I get that smtp error when trying to send mail.

    any help?

     
    • OniShiro

      OniShiro - 2006-06-07

      help please, I use the following code:

                      MailMessage msg = new MailMessage("mail@mail.com", "mail@mail.com");

                      Smtp smtp = new Smtp();
                      smtp.Host = "mail.mail.com";
                      smtp.Port = 25;                    
                     
                      msg.Subject = "Contacto";
                      msg.Body = "Este e-mail usa HTML";
                      string style = "<style>body, html {scrollbar-face-color: #9cbaa9;scrollbar-arrow-color: #ffffff;scrollbar-highlight-color: #e4ede8;scrollbar-darkshadow-color: #789283;scrollbar-shadow-color: #8ea99a;}.infotable{background-color:#e4ede8;padding:0px;margin:0px;}.Vseparator{background-color:#FFFFFF;height:2px;}.darkgreenTextbold{padding:5px;color:#336666;font-weight:bold;font-size:12px;}td{font-size:12px;}</style>";

                      string strBody = "<html><head>"+style+"</head><body><br /><br />\n";
                      strBody+="<table width=\&quot;70%\&quot; align=\&quot;center\&quot; class=\&quot;infotable\&quot;>\n";
                      strBody+="<tr><td colspan=\&quot;2\&quot; class=\&quot;darkgreenTextbold\&quot;>CONTACTO</td></tr>\n";
                      strBody+="<tr><td class=\&quot;Vseparator\&quot; colspan=\&quot;2\&quot;></td></tr>\n";
                      strBody+="<tr><td width=\&quot;80\&quot; class=\&quot;darkgreenTextbold\&quot;>Nombre</td><td align=\&quot;left\&quot;>"+Nombre.Text+"</td></tr>\n";
                      strBody+="<tr><td class=\&quot;darkgreenTextbold\&quot;>Empresa</td><td align=\&quot;left\&quot;>"+Empresa.Text+"</td></tr>\n";
                      strBody+="<tr><td class=\&quot;darkgreenTextbold\&quot;>Teléfono</td><td align=\&quot;left\&quot;>"+Telefono.Text+"</td></tr>\n";
                      strBody+="<tr><td class=\&quot;darkgreenTextbold\&quot;>E-mail</td><td align=\&quot;left\&quot;>"+EmailAdr.Text+"</td></tr>\n";
                      strBody+="<tr><td class=\&quot;darkgreenTextbold\&quot;>Comentario</td><td align=\&quot;left\&quot;>"+Comentario.Text+"</td></tr>\n";
                      strBody+="</table>";
                      strBody+="</body></html>";

                      msg.HtmlBody=strBody;
                     
                      msg.Charset = "ISO-8859-1";
                      msg.Priority = MailPriority.Normal;
                         

                      smtp.Username = "mail@mail.com";
                      smtp.Password = "pass";
                         
                      smtp.SendMail(msg);

       
      • Geoff Osbaldestin

        Response 334 is about you needing to Auth login to the SMTP connection

         
    • OniShiro

      OniShiro - 2006-06-08

      well, nevermind, I used dotnetopenmail instead and it worked fine on the first attempt.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.