| Author |  | 
      
        | samuel Newbie
 
  
 
 Joined: 15 May 2014
 Online Status: Offline
 Posts: 2
 | 
          Hi all,
           | Posted: 08 June 2014 at 7:42pm | IP Logged |   |  
           | 
 |  
 I have a problem that when I set "sender" I can send email, however if not set "sender" I cannot send email. Codes like below:
 
 Smtp mailer = new Smtp();
 SmtpServer server = new SmtpServer("InternalSMTP2");
 mailer.SmtpServers.Add(server);
 
 mailer.Message.From.Email = "aaa@gmail.com";
 mailer.Message.To.Add("aaa@hotmail.com", "smh");
 mailer.Message.Subject = "Test Mailbee";
 
 mailer.Send("bb@hotmail.com", (string)null);//if set Sender, can send.
 mailer.Send();// if not set Sender, it goes wrong.
 
 Can someone give some help?
 Thanks
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Igor AfterLogic Support
 
  
 
 Joined: 24 June 2008
 Location: United States
 Online Status: Offline
 Posts: 6167
 | 
          If you're sending mail between different domains (from gmail to hotmail, in your case), that usually requires performing SMTP authentication, and seems like you don't do that it's probably the reason behind the error you got, you should check SMTP logs to see if that's the case. By supplying sender in the same domain as the recipient, you've bypassed that restriction, but in general case you should always authenticate on SMTP if you need to send mail to any domain.
           | Posted: 09 June 2014 at 3:44am | IP Logged |   |  
           | 
 |  
 --
 Regards,
 Igor, AfterLogic Support
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | renoldscott Newbie
 
  
 
 Joined: 21 March 2014
 Location: United States
 Online Status: Offline
 Posts: 4
 | 
          in past i also have same problem but it automatically solved.
           | Posted: 18 June 2014 at 12:38am | IP Logged |   |  
           | 
 |  | 
       
        | Back to Top |       | 
       
       
        |  |