i cannot send messages from my email using asp.net to other emails
outside my domain
i have this error Mailbox not Found :no such user
anyone ?
Pedro
thanks
----> Code
public static void SendTeste(out string email,out string recip,out
string xi)
{
SiteSettings s = SiteSettings.GetSharedSettings();
xi = "teste";
email = s.SiteEmailFromField;
recip = GetAdminRecipients();
StringBuilder messageBody = new StringBuilder();
messageBody.AppendFormat("Um novo anuncio foi colocado no site
'{0}':", s.SiteName);
messageBody.AppendLine();
try
{
//MailMessage m = new MailMessage(s.SiteEmailFromField,
GetAdminRecipients());
MailMessage m = new MailMessage(s.SiteEmailFromField,
"pedro@code4cerveja.com,dinisnet@hotmail.com,aplp@sapo.pt");
m.Subject ="Novo anuncio colocado:";
m.Body = messageBody.ToString();
SmtpClient client = new SmtpClient();
client.Send(m);
}
catch (Exception x) { //xi = x.Message;
Exception ex2 = x;
//string xi = string.Empty;
while (ex2 != null)
{
xi += ex2.ToString();
ex2 = ex2.InnerException;
}
}
}
------>>>errors
testeSystem.Net.Mail.SmtpFailedRecipientsException: Impossível enviar
para um destinatário. --->
System.Net.Mail.SmtpFailedRecipientException: Caixa de correio não
disponível. A resposta do servidor foi: No such user here --- Fim do
rastreio da pilha de excepção interna --- em
System.Net.Mail.SmtpClient.Send(MailMessage message) em
Logica.Personal.Manutencao.SendTeste(String& email, String& recip,
String& xi) em
f:quartos.code4cerveja.comApp_CodeLogicaManutencao.cs:line
48System.Net.Mail.SmtpFailedRecipientException: Caixa de correio não
disponível. A resposta do servidor foi: No such user here
Caixa de correio não disponível means Mailbox Not Found
Alexey Smirnov - 03 Mar 2008 20:29 GMT
On Mar 3, 3:19 pm, pe...@code4cerveja.com wrote:
> i cannot send messages from my email using asp.net to other emails
> outside my domain
[quoted text clipped - 62 lines]
>
> Caixa de correio não disponível means Mailbox Not Found
First of all, I think you would need to separate each recipient with a
semicolon. Then check if server requires credentials and include
them if needed.
sloan - 03 Mar 2008 21:19 GMT
Go here
http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!138.entry
download the code.
This will give you a pretty good baseline to test against.
And work on the ";" vs "," as well.
i cannot send messages from my email using asp.net to other emails
outside my domain
i have this error Mailbox not Found :no such user
anyone ?
Pedro
thanks
----> Code
public static void SendTeste(out string email,out string recip,out
string xi)
{
SiteSettings s = SiteSettings.GetSharedSettings();
xi = "teste";
email = s.SiteEmailFromField;
recip = GetAdminRecipients();
StringBuilder messageBody = new StringBuilder();
messageBody.AppendFormat("Um novo anuncio foi colocado no site
'{0}':", s.SiteName);
messageBody.AppendLine();
try
{
//MailMessage m = new MailMessage(s.SiteEmailFromField,
GetAdminRecipients());
MailMessage m = new MailMessage(s.SiteEmailFromField,
"pedro@code4cerveja.com,dinisnet@hotmail.com,aplp@sapo.pt");
m.Subject ="Novo anuncio colocado:";
m.Body = messageBody.ToString();
SmtpClient client = new SmtpClient();
client.Send(m);
}
catch (Exception x) { //xi = x.Message;
Exception ex2 = x;
//string xi = string.Empty;
while (ex2 != null)
{
xi += ex2.ToString();
ex2 = ex2.InnerException;
}
}
}
------>>>errors
testeSystem.Net.Mail.SmtpFailedRecipientsException: Impossível enviar
para um destinatário. --->
System.Net.Mail.SmtpFailedRecipientException: Caixa de correio não
disponível. A resposta do servidor foi: No such user here --- Fim do
rastreio da pilha de excepção interna --- em
System.Net.Mail.SmtpClient.Send(MailMessage message) em
Logica.Personal.Manutencao.SendTeste(String& email, String& recip,
String& xi) em
f:quartos.code4cerveja.comApp_CodeLogicaManutencao.cs:line
48System.Net.Mail.SmtpFailedRecipientException: Caixa de correio não
disponível. A resposta do servidor foi: No such user here
Caixa de correio não disponível means Mailbox Not Found