Foros del Web » Programando para Internet » ASPX (.net) »

Como enviar correo con validacion smtp?

Estas en el tema de Como enviar correo con validacion smtp? en el foro de ASPX (.net) en Foros del Web. Amigos tengo el siguiente problema: Ya tengo una aplicacion que envia un correo a los tecnicos para que den servicio de soporte tecnico pero desde ...
  #1 (permalink)  
Antiguo 18/07/2006, 08:17
 
Fecha de Ingreso: febrero-2006
Mensajes: 47
Antigüedad: 18 años, 2 meses
Puntos: 0
Como enviar correo con validacion smtp?

Amigos tengo el siguiente problema:
Ya tengo una aplicacion que envia un correo a los tecnicos para que den servicio de soporte tecnico pero desde que se utiliza autenticacion smtp me sale este error en el cliente de la aplicacion.

Server Error in '/' Application.
--------------------------------------------------------------------------------

Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".


<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>


Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.


<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration




gracias confio en que me puedan ayudar.
  #2 (permalink)  
Antiguo 18/07/2006, 08:30
Avatar de moNTeZIon  
Fecha de Ingreso: enero-2005
Ubicación: Lliçà de Munt - BCN
Mensajes: 1.625
Antigüedad: 19 años, 4 meses
Puntos: 9
Si pones mode="Off" en la seccion CustomErrors, podrás ver los detalles del error que te manda.
Luego si, pones aqui en el foro el error que te da.
Saludos.
__________________
..:: moNTeZIon ::..
  #3 (permalink)  
Antiguo 18/07/2006, 10:53
 
Fecha de Ingreso: febrero-2006
Mensajes: 47
Antigüedad: 18 años, 2 meses
Puntos: 0
OK, este es el código que me da despues de poner el mode = 'Off'



Server Error in '/nuevo' Application.
--------------------------------------------------------------------------------

The server rejected one or more recipient addresses. The server response was: 530 Authentication required

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: The server rejected one or more recipient addresses. The server response was: 530 Authentication required


Source Error:


Line 262: message.Cc = "[email protected]";
Line 263: SmtpMail.SmtpServer = "192.168.132.6";
Line 264: SmtpMail.Send(message);
Line 265:
Line 266: conn.Close();


Source File: d:\Proyect\C# Project\nuevo\AsistenciaTecnica.aspx.cs Line: 264

Stack Trace:


[COMException (0x8004020f): The server rejected one or more recipient addresses. The server response was: 530 Authentication required
]

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters) +0
System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams) +2501760
System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj, String methodName, Object[] args) +72

[HttpException (0x80004005): The server rejected one or more recipient addresses. The server response was: 530 Authentication required
]
System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj, String methodName, Object[] args) +119
System.Web.Mail.CdoSysHelper.Send(MailMessage message) +2684
System.Web.Mail.SmtpMail.Send(MailMessage message) +131
SitioUNSC.AsistenciaTecnica.btnEnviar_Click(Object sender, EventArgs e) in d:\Proyect\C# Project\nuevo\AsistenciaTecnica.aspx.cs:264
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEven t(String eventArgument) +107
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
  #4 (permalink)  
Antiguo 18/07/2006, 15:05
Avatar de RootK
Moderador
 
Fecha de Ingreso: febrero-2002
Ubicación: México D.F
Mensajes: 8.004
Antigüedad: 22 años, 2 meses
Puntos: 50
por lo visto tienes personalizado el manejo de errores.. (que por cierto hay que definirlo bien para que apunte a una página de manejo de error y no la clásica pantalla amarilla) pero ese no es el problema.. la cuestion es que al parecer es que necesitas autenticar tu smtp hace tiempo les mande un ejemplo (de hecho está en las faq´s)... mira:

http://www.forosdelweb.com/s5fc89176...msg202591.html

espero que sea lo que buscas..

Salu2
__________________
Nadie roba nada ya que en la vida todo se paga . . .

Exentrit - Soluciones SharePoint & Net
  #5 (permalink)  
Antiguo 19/07/2006, 06:36
 
Fecha de Ingreso: febrero-2006
Mensajes: 47
Antigüedad: 18 años, 2 meses
Puntos: 0
Gracias Rootk ayer pude resolver con un artículo de msdn pero como no he publicado los 15 mensajes no puse el link, ahí estaba el ejemplo en C# tal y como me hacia falta.

Muchas gracias de todas formas.
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 12:54.