Question : 5 hour time difference.

if (Page.IsValid)
            {

                ////
                tbl_Mailbox tbl_Mailbox = new tbl_Mailbox();
                tbl_Mailbox.ProfileID = Convert.ToInt32(ToUserProfileID);
                tbl_Mailbox.FromProfileID = Convert.ToInt32(UserProfileID);
                tbl_Mailbox.Subject = txtSubject.Text;
                tbl_Mailbox.Body = txtMessage.Text;
                tbl_Mailbox.Box = "inbox";
                tbl_Mailbox.FromUsername = UserName;
                tbl_Mailbox.Tag = 0;
                tbl_Mailbox.MsgDate = DateTime.Now; ---> the time is 5 hours ahead
                tbl_Mailbox.MsgDeleted = 0;
                tbl_Mailbox.MsgRead = 0;
                tbl_Mailbox.MsgReplied = 0;

                int returnValue = 0;

Answer : 5 hour time difference.

Exchange uses the primary email address as the outbound from address, and you can only have one primary email address per account.

I beleive the only way around this is to setup another mailbox with the other address as primary and set it up as an additional account using POP/SMTP in the users mailbox. Like you would if you setup your personal internet email in your mail profile. Then you can select a different from account.  
Random Solutions  
 
programming4us programming4us