0

I am using a webform to send an email. The webform contains a textarea field.

I have noticed that if I enter a paragraph of text in the textarea field, then that same text is split into multiple lines in the email I receive.

So rather than being a single line of text which is wrapped within the email, it looks like the paragraph is split into separate lines (as shown in following image): enter image description here

This is puzzling since if I check the body of the email using hook_mail_alter() the paragraph appears as a single line of text:

enter image description here

I can't work out why this is occurring. I am not sure if this is something that webform is doing or if it is something being done by the mail server itself (could it be something to do with plain text email protocal perhaps?). Was hoping someone would be able to enlighten me on the likely cause of this issue and how to solve it?

0

The issue seems to be with the plain text format of the mail.If you want to send mail content with designed structure then you must use Mime mail module.Once you enable the module you can use a HTML formatter for the textarea that is used to structure the mail. Let me know if you face any issues.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.