Last post Aug 24, 2012 01:35 AM by karenbalmaceda
Aug 23, 2012 09:42 AM|karenbalmaceda|LINK
Hi, I published my system and there seems to be an error or soemthing that is missing in my web configuration that points out to this error:
When making a request as an account that does not have a mailbox, you must specify the mailbox primary SMTP address for any distinguished folder Ids.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: Microsoft.Exchange.WebServices.Data.ServiceResponseException: When making a request as an account that does not have a mailbox, you must specify the mailbox primary SMTP address for any distinguished folder Ids.
Line 404: message3.Importance = Importance.High;
Line 405: message3.ToRecipients.Add(Email3);
Line 406: message3.Save(); //this line causes the error.
Line 407: message3.SendAndSaveCopy();
I have this in my web.config:
<network host="10.161.193.00" port="80" defaultCredentials="true"/>
</mailSettings>Code for sending the email:
ExchangeService webservice3 = new ExchangeService(ExchangeVersion.Exchange2007_SP1);
webservice3.UseDefaultCredentials = true;
Email3 = lbl_Email.Text;
EmployeeName3 = lbl_EmpName.Text;
ItemCategory3 = ddl_ItemCategory.Text;
ItemName3 = ddl_ItemName.Text;
DateRequested3 = lbl_DateRequested.Text;
Quantity3 = Convert.ToString(QR);
Unit3 = txt_UnitOfMeasure.Text;
ApprovalLink3 = "LINK";
EmailMessage message3 = new EmailMessage(webservice3);
message3.Subject = "Email Subject";
message3.Body = "EMAIL BODY"
message3.Importance = Importance.High;
I hope someone can help. Thank you!
Aug 23, 2012 10:41 AM|Rajesh Sawant|LINK
It seems that the MailBox id is not defined, so kindly check the following things :-
1.Make mail box for credential domain user on Exch 2007
2.On Exchange server 2007/RC/Mailbox,
credential user has to be added into Mannage Full Access Permission and Properties/Mail Flow Settings/Delivery Option/Grant for
Reference : -
Hope this will work for you.
Aug 24, 2012 01:35 AM|karenbalmaceda|LINK
Hi, thanks Rajesh! But I can't seem to find a way on how to make a mailbox for credential domain user. Can I use an existing mailbox? Thank you.