I have a sendmail function in one of my custom modules. It is working fine if it is sending to internal staff's email. But if I tried to recipient's email is external email (ie. hotmail, gmail, etc), then I will encounter this error:
Method: System.Net.Mail.SmtpTransport.SendMail
StackTrace:
Message: System.Net.Mail.SmtpFailedRecipientException: Mailbox unavailable. The server response was: 5.7.1 Unable to relay for xxxx@hotmail.com at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, SmtpFailedRecipientException& exception) at System.Net.Mail.SmtpClient.Send(MailMessage message) at DotNetNuke.Services.Mail.Mail.SendMail(String MailFrom, String MailTo, String Cc, String Bcc, MailPriority Priority, String Subject, MailFormat BodyFormat, Encoding BodyEncoding, String Body, String Attachment, String SMTPServer, String SMTPAuthentication, String SMTPUsername, String SMTPPassword, Boolean SMTPEnableSSL)