Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Fala pessoal, beleza?
Estou tentando enviar um e-mail de confirmação de senha do sistema porém obtenho o seguinte erro:
Mailbox unavailable. The server response was: 5.7.1 <mayragauditano@gmail.com>... we do not relay <giovanni@webingbrasil.com.br>
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.Net.Mail.SmtpFailedRecipientException: Mailbox unavailable. The server response was: 5.7.1 <mayragauditano@gmail.com>... we do not relay <giovanni@webingbrasil.com.br>
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SmtpFailedRecipientException: Mailbox unavailable. The server response was: 5.7.1 <mayragauditano@gmail.com>... we do not relay <giovanni@webingbrasil.com.br>]
CONTATOS.Base.FUNC_ENVIA_EMAIL(String STR_REMENTENTE, String STR_DESTINATARIO, String STR_ASSUNTO, String STR_CORPO_EMAIL, String STR_ANEXO, String STR_CC, String STR_SMTP) in C:\Users\Note_Giovanni\Documents\Visual Studio 2008\Projects\TRIUNFO\CONTATOS\Base.cs:358
LembrarSenha.btnEnviarSenha_Click(Object sender, EventArgs e) +421
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
Segue abaixo como estou fazendo para mandar o e-mail:
Chamada de função:
var clBase = new CONTATOS.Base();
clBase.FUNC_ENVIA_EMAIL("giovanni@webingbrasil.com.br", txtEmail.Text, "Lembrete de senha do Sistema", "Olá <b>" + VarNomeUsuario + "</b>.<br>Confirme abaixo suas informações de Login do Sistema.<p><b>Login: " + VarLogin + "<br>Senha: " + VarSenha + "</b>", "", "", "smtp.webingbrasil.com.br");
Função:
#region ENVIA E-MAIL
public void FUNC_ENVIA_EMAIL(string STR_REMENTENTE, string STR_DESTINATARIO, string STR_ASSUNTO, string STR_CORPO_EMAIL, string STR_ANEXO, string STR_CC, string STR_SMTP)
{
MailMessage ObjEmailFAC = new MailMessage();
try
{
ObjEmailFAC.From = new MailAddress(@STR_REMENTENTE);
ObjEmailFAC.Subject = STR_CORPO_EMAIL;
ObjEmailFAC.Body = STR_CORPO_EMAIL;
ObjEmailFAC.IsBodyHtml = true;
if (STR_CC == string.Empty)
ObjEmailFAC.To.Add(STR_DESTINATARIO);
else
ObjEmailFAC.To.Add(STR_DESTINATARIO + "," + STR_CC);
if (!(STR_ANEXO == string.Empty))
ObjEmailFAC.Attachments.Add(new Attachment(STR_ANEXO));
SmtpClient ObjEnviaEmail = new SmtpClient(STR_SMTP);
ObjEnviaEmail.Send(ObjEmailFAC);
}
catch (Exception EX)
{
throw EX;
}
}
#endregion
O que estou fazendo de errado?
Valeu galera e abraços,
Prompt
Carregando comentários...