Adding line breaks to a text/plain email

后端 未结 2 1021
情书的邮戳
情书的邮戳 2021-02-05 00:56

I\'m having a problem sending a plain text (not HTML!) email, all my line breaks are being ignored:

->setBody(\'Did you request a pa         


        
2条回答
  •  逝去的感伤
    2021-02-05 01:27

    use double quotes like this

    ->setBody("Did you request a password reset for your account?\r\n\r\nIf yes, click here:\r\nhttp://www.website.com", 'text/plain');
    

提交回复
热议问题