Page 1 of 1
Emails are not getting line breaks
Posted: Mon Feb 01, 2016 2:45 pm
by vinman57
Script URL:
www.pianowizardacademy.com/helpdesk
Version of script: 2.6.5
Hosting company: hostgator
Hi. Emails are not getting line breaks. new_ticket.txt for example the way I want it displayed:
Dear %%NAME%%,
Your support ticket "%%SUBJECT%%" has been received.
Priority:%%PRIORITY%%
Category: %%CATEGORY%%
----------------------
%%MESSAGE%%
----------------------
Appear as this in Outlook at least:
Your support ticket “Testing” has been received. Priority:Low Category: Pre-Sales
---------------------- this is a message
I even tried adding <br> in the text file. Any ideas?
Re: Emails are not getting line breaks
Posted: Mon Feb 01, 2016 3:23 pm
by Klemen
Do you get line breaks with original unmodified files?
If yes, the most likely error is problems with line endings. Edit text files in a powerful text editor such as
Notepadd++ and try either Windows or Unix line endings (even if on a Mac).
Re: Emails are not getting line breaks
Posted: Mon Feb 01, 2016 3:46 pm
by vinman57
I am using Notepad ++
Re: Emails are not getting line breaks
Posted: Mon Feb 01, 2016 3:53 pm
by vinman57
The unmodified files look fine. But they don't have
Priority:%%PRIORITY%%
Category: %%CATEGORY%%
In them. As soon as I put them in they get messed up. As am using Notepad ++
Re: Emails are not getting line breaks
Posted: Mon Feb 01, 2016 3:56 pm
by Klemen
Go to "Edit" > "EOL Conversion" and make sure you have Windows selected (selected is grayed out). Then save, upload again and test.
Re: Emails are not getting line breaks
Posted: Mon Feb 01, 2016 4:14 pm
by vinman57
Yep, Windows is grayed out
Re: Emails are not getting line breaks
Posted: Mon Feb 01, 2016 4:52 pm
by Klemen
Not sure what to say then... it doesn't make any sense that it works for one file but not for another.
Are you 100% sure the files are getting uploaded to the server in ASCII mode, not binary?
Re: Emails are not getting line breaks
Posted: Wed Feb 03, 2016 5:25 am
by vinman57
Klemen
I wracked my brain out of this, tried different ftp programs, reuploaded hesk files. Nothing worked.
Finally, I recalled that not too long ago I changed the STMP to use a 3rd party called SENDGRID.
I had to change a setting there "Convert your plain text emails to HTML"
and the problem is gone.
In other words, Sendgrid was converting into html, and completly changing the appearance of the email
Resolved
Thanks
Re: Emails are not getting line breaks
Posted: Wed Feb 03, 2016 12:02 pm
by Klemen
Thanks for the info and glad to hear you got it working!