I’ve downloaded a sample application sending email silverlight application here.
via gmail. But I cant make it work. Its error is “Failure sending mail.”
{“Failure sending mail.”}
[System.Net.Mail.SmtpException]: {“Failure sending mail.”}
Data: {System.Collections.ListDictionaryInternal}
HelpLink: null
InnerException: {“Unable to connect to the remote server”}
Message: “Failure sending mail.”
Source: “System”
StackTrace: ” at System.Net.Mail.SmtpClient.Send(MailMessage message)\r\n at SLSentEmail.Web.Services.EmailService.SendEmail(SLEmailMessage emailMessage) in C:\Downloads\Temp\SLSentEmail\SLSentEmail\SLSentEmail.Web\Services\EmailService.svc.cs:line 27″
TargetSite: {Void Send(System.Net.Mail.MailMessage)}
Without knowing your setup or code, I would look into the inner exception – “Unable to connect to the remote server”.
Do you actually have access to the SMTP server?
Could there be a block due to a system or network firewall?
Some ISPs block port 25 in order to stop bot spamming, you may need to connect via a different port.