2

I have to send the attachment with the email through apex class and the body need to be in a format that needs a line break as html is not supported in attachment.

Can someone help me on this.

Thanks in Advance.

6
  • 1
    I think in the header you need to mention the content-type. If you mention the 'content type' as 'text/html' use <br> or if if you mention it as 'text/plain' then use /n for the newline.
    – user3170
    Sep 25, 2013 at 9:04
  • Which file type you are attaching or what are you building to attach ? @Mahi
    – Ashwani
    Sep 25, 2013 at 9:26
  • I am sending the invitation detail in the attachment and so i need to send information in different lines. If a user click on this attachment it should open in outlook and when I use content-type then it open with any default browser and do not work and also <br> and /n does not work.
    – Mahi
    Sep 25, 2013 at 12:22
  • 1
    It's not /n. It's \n.
    – Adrian Larson
    Sep 25, 2013 at 20:59
  • yes, i tried \n but it is not working...
    – Mahi
    Sep 26, 2013 at 4:15

0

You must log in to answer this question.

Browse other questions tagged .