An error occurred while sending mail. The mail server responded:

Help
Ashish
2014-05-26
2014-05-26
  • Ashish
    Ashish
    2014-05-26

    Hi,
    I am getting below error while sending mail using Davmail and thunderbird

    Davmail version : 4.3.4-2174
    Thunderbird version : 24.5.0

    2014-05-26 23:28:32,775 ERROR [SmtpConnection-51438] davmail - ErrorSendAsDenied The user account which was used to submit this request does not have the right to send mail on behalf of the specified sending account.

    Can anyone help me?

    Detailed Logs:

    2014-05-26 23:28:32,432 DEBUG [SmtpConnection-51438] org.apache.commons.httpclient.util.IdleConnectionHandler - Adding connection at: 1401127112432
    2014-05-26 23:28:32,432 DEBUG [SmtpConnection-51438] org.apache.commons.httpclient.MultiThreadedHttpConnectionManager - Notifying no-one, there are no waiting threads
    2014-05-26 23:28:32,432 DEBUG [SmtpConnection-51438] davmail - > 235 OK Authenticated
    2014-05-26 23:28:32,433 DEBUG [SmtpConnection-51438] davmail - < MAIL FROM:mmt39900@makemytrip.com
    2014-05-26 23:28:32,433 DEBUG [SmtpConnection-51438] davmail - > 250 Sender OK
    2014-05-26 23:28:32,433 DEBUG [SmtpConnection-51438] davmail - < RCPT TO:ashishkumar10@gmail.com
    2014-05-26 23:28:32,433 DEBUG [SmtpConnection-51438] davmail - > 250 Recipient OK
    2014-05-26 23:28:32,434 DEBUG [SmtpConnection-51438] davmail - < DATA
    2014-05-26 23:28:32,434 DEBUG [SmtpConnection-51438] davmail - > 354 Start mail input; end with <CRLF>.<CRLF>
    2014-05-26 23:28:32,775 DEBUG [SmtpConnection-51438] org.apache.commons.httpclient.util.IdleConnectionHandler - Adding connection at: 1401127112775
    2014-05-26 23:28:32,775 DEBUG [SmtpConnection-51438] org.apache.commons.httpclient.MultiThreadedHttpConnectionManager - Notifying no-one, there are no waiting threads
    2014-05-26 23:28:32,775 ERROR [SmtpConnection-51438] davmail - ErrorSendAsDenied The user account which was used to submit this request does not have the right to send mail on behalf of the specified sending account.
    request: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"><soap:Header><t:RequestServerVersion Version="Exchange2010_SP1"/></soap:Header><soap:Body><m:CreateItem MessageDisposition="SendOnly"><m:SavedItemFolderId><t:DistinguishedFolderId Id="sentitems"/></m:SavedItemFolderId><m:Items><t:Message><t:MimeContent>TWVzc2FnZS1JRDogPDUzODM4MEM3LjUwNzAyQG1ha2VteXRyaXAuY29tPg0KRGF0ZTogTW9uLCAyNiBNYXkgMjAxNCAyMzoyODozMSArMDUzMA0KRnJvbTogYXNoaXNoIDxtbXQzOTkwQG1ha2VteXRyaXAuY29tPg0KVXNlci1BZ2VudDogTW96aWxsYS81LjAgKFgxMTsgTGludXggeDg2XzY0OyBydjoyNC4wKSBHZWNrby8yMDEwMDEwMSBUaHVuZGVyYmlyZC8yNC41LjANCk1JTUUtVmVyc2lvbjogMS4wDQpUbzogYXNoaXNoa3VtYXIxMDAwQGdtYWlsLmNvbQ0KU3ViamVjdDogdGVzdA0KQ29udGVudC1UeXBlOiB0ZXh0L3BsYWluOyBjaGFyc2V0PUlTTy04ODU5LTENCkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IDdiaXQNCg0KdGVzdCBtYWls</t:MimeContent></t:Message></m:Items></m:CreateItem></soap:Body></soap:Envelope>
    davmail.exchange.ews.EWSException: ErrorSendAsDenied The user account which was used to submit this request does not have the right to send mail on behalf of the specified sending account.
    request: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"><soap:Header><t:RequestServerVersion Version="Exchange2010_SP1"/></soap:Header><soap:Body><m:CreateItem MessageDisposition="SendOnly"><m:SavedItemFolderId><t:DistinguishedFolderId Id="sentitems"/></m:SavedItemFolderId><m:Items><t:Message><t:MimeContent>TWVzc2FnZS1JRDogPDUzODM4MEM3LjUwNzAyQG1ha2VteXRyaXAuY29tPg0KRGF0ZTogTW9uLCAyNiBNYXkgMjAxNCAyMzoyODozMSArMDUzMA0KRnJvbTogYXNoaXNoIDxtbXQzOTkwQG1ha2VteXRyaXAuY29tPg0KVXNlci1BZ2VudDogTW96aWxsYS81LjAgKFgxMTsgTGludXggeDg2XzY0OyBydjoyNC4wKSBHZWNrby8yMDEwMDEwMSBUaHVuZGVyYmlyZC8yNC41LjANCk1JTUUtVmVyc2lvbjogMS4wDQpUbzogYXNoaXNoa3VtYXIxMDAwQGdtYWlsLmNvbQ0KU3ViamVjdDogdGVzdA0KQ29udGVudC1UeXBlOiB0ZXh0L3BsYWluOyBjaGFyc2V0PUlTTy04ODU5LTENCkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IDdiaXQNCg0KdGVzdCBtYWls</t:MimeContent></t:Message></m:Items></m:CreateItem></soap:Body></soap:Envelope>
    at davmail.exchange.ews.EWSMethod.checkSuccess(EWSMethod.java:713)
    at davmail.exchange.ews.EwsExchangeSession.executeMethod(EwsExchangeSession.java:2226)
    at davmail.exchange.ews.EwsExchangeSession.sendMessage(EwsExchangeSession.java:523)
    at davmail.exchange.ews.EwsExchangeSession.sendMessage(EwsExchangeSession.java:539)
    at davmail.exchange.ExchangeSession.sendMessage(ExchangeSession.java:1309)
    at davmail.smtp.SmtpConnection.run(SmtpConnection.java:166)
    2014-05-26 23:28:32,776 DEBUG [SmtpConnection-51438] davmail - > 451 Error : davmail.exchange.ews.EWSException: ErrorSendAsDenied The user account which was used to submit this request does not have the right to send mail on behalf of the specified sending account.
    request: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"><soap:Header><t:RequestServerVersion Version="Exchange2010_SP1"/></soap:Header><soap:Body><m:CreateItem MessageDisposition="SendOnly"><m:SavedItemFolderId><t:DistinguishedFolderId Id="sentitems"/></m:SavedItemFolderId><m:Items><t:Message><t:MimeContent>TWVzc2FnZS1JRDogPDUzODM4MEM3LjUwNzAyQG1ha2VteXRyaXAuY29tPg0KRGF0ZTogTW9uLCAyNiBNYXkgMjAxNCAyMzoyODozMSArMDUzMA0KRnJvbTogYXNoaXNoIDxtbXQzOTkwQG1ha2VteXRyaXAuY29tPg0KVXNlci1BZ2VudDogTW96aWxsYS81LjAgKFgxMTsgTGludXggeDg2XzY0OyBydjoyNC4wKSBHZWNrby8yMDEwMDEwMSBUaHVuZGVyYmlyZC8yNC41LjANCk1JTUUtVmVyc2lvbjogMS4wDQpUbzogYXNoaXNoa3VtYXIxMDAwQGdtYWlsLmNvbQ0KU3ViamVjdDogdGVzdA0KQ29udGVudC1UeXBlOiB0ZXh0L3BsYWluOyBjaGFyc2V0PUlTTy04ODU5LTENCkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IDdiaXQNCg0KdGVzdCBtYWls</t:MimeContent></t:Message></m:Items></m:CreateItem></soap:Body></soap:Envelope> ErrorSendAsDenied The user account which was used to submit this request does not have the right to send mail on behalf of the specified sending account.
    request: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"><soap:Header><t:RequestServerVersion Version="Exchange2010_SP1"/></soap:Header><soap:Body><m:CreateItem MessageDisposition="SendOnly"><m:SavedItemFolderId><t:DistinguishedFolderId Id="sentitems"/></m:SavedItemFolderId><m:Items><t:Message><t:MimeContent>TWVzc2FnZS1JRDogPDUzODM4MEM3LjUwNzAyQG1ha2VteXRyaXAuY29tPg0KRGF0ZTogTW9uLCAyNiBNYXkgMjAxNCAyMzoyODozMSArMDUzMA0KRnJvbTogYXNoaXNoIDxtbXQzOTkwQG1ha2VteXRyaXAuY29tPg0KVXNlci1BZ2VudDogTW96aWxsYS81LjAgKFgxMTsgTGludXggeDg2XzY0OyBydjoyNC4wKSBHZWNrby8yMDEwMDEwMSBUaHVuZGVyYmlyZC8yNC41LjANCk1JTUUtVmVyc2lvbjogMS4wDQpUbzogYXNoaXNoa3VtYXIxMDAwQGdtYWlsLmNvbQ0KU3ViamVjdDogdGVzdA0KQ29udGVudC1UeXBlOiB0ZXh0L3BsYWluOyBjaGFyc2V0PUlTTy04ODU5LTENCkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IDdiaXQNCg0KdGVzdCBtYWls</t:MimeContent></t:Message></m:Items></m:CreateItem></soap:Body></soap:Envelope>

     
  • First make sure that your From address matches Exchange mailbox address (check this in OWA or DavMail log file)