• Nitish Bhardwaj 32
  • NEWBIE
  • 5 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
 mail.setReferences('References: 1*<'+String.valueOf(b2bcid)+'> CRLF');

Hello guys,

 

if I'm using this in my outbound messages class I'm getting error as

 

System.EmailException: SendEmail failed. First exception on row 0; first error: INVALID_MESSAGE_ID_REFERENCE, References header is not valid.: []
Class.WPOSP.B2BRespondtoinquirycontroller.sendResponse: line 59, column 5 External entry point 

 

in the above code String.valueOf(b2bcid) is my record id. I was wondering what will be the syntax of mail.setReferenes method.

 

I also looked at http://tools.ietf.org/html/rfc2822#section-3.6.4 but couldn't understand the syntax.

 

Could you please help me in this.

 

Thanks,

Vamsii

  • July 09, 2011
  • Like
  • 0