Email line break

ASghostKI

Verified User
Joined
Oct 30, 2020
Messages
30
Hello, I have a problem with the emails that Directadmin send, it always adds a line break on URLs, how can I prevent that ?

1604497240355.png
 
I didn't edit anything beside configuring email to be sent via an external smtp server, might it be the problem ? I'm using sendinblue
 
Hi guys,

I've just checked the code, and the |TYPE| token in the data/templates/message_user.txt template, would be hardcoded to either "message" or "ticket". Because we're seeing an extra newline and = character, I'm suspecting something with the template itself.

Check:
Code:
cd /usr/local/directadmin/data/templates
cat message_user.txt
to ensure there are no newlines where the don't below. The URL should look like this:
Code:
|HTTP||DOMAIN|:|PORT|/CMD_TICKET?action=view&number=|NUMBER|&type=|TYPE|
Also check for cd /usr/local/directadmin/data/templates/custom
cat message_user.txt[/code]which should follow the same rules (no mid-URL newline).

If I had to guess, either the original or custom message_user.txt has "\n=" in the URL.

John
 
Here is mine
|?SUBJECT=New Message: `MESSAGE_SUBJECT`|
A new message or response with subject:

|MESSAGE_SUBJECT|

has arrived for you to view.
Follow this link to view it:

|HTTP||DOMAIN|:|PORT|/CMD_TICKET?action=view&number=|NUMBER|&type=|TYPE|


|MSG_FOOTER|

Do Not Reply.
 
Thank you, but it's the same line there is no line break there and also I have no custom message_user.txt
I more inclined to think that it's the external smtp server fault I'll try to change to Sendgrid to test this out and I'll keep you updated
 
Try setting your email address for the Message System to be something local, like [email protected], and generate a message there to see if it's been modified or not. If not, but sending through Sendgrid, then your suspicion may be correct.

John
 
Yeap testing locally is easier, and yes that was the problem, I tested locally and the url was correct
1604529124510.png



So the smtp server adds that line break or maybe it limits line length, so well I don't expect to find a solution for this here but well Thank you guys for the help

PS: Sendgrid was good since it replaces anyways all links on emails (url rebranding or smt)
 
Back
Top