Avatar of flynny
flynny
Flag for United Kingdom of Great Britain and Northern Ireland asked on

\r\n appearing in registration email from Joomla

Hi all,

Basically when I register from my Joomla site the registration activation email being sent contains the \r\n instead of the newline?

The settings we are using are as follows;

    Mailer * SMTP
    From email admin@domain.co.uk
    From Name admin
    Sendmail Path /usr/sbin/sendmail
    SMTP Authentication Yes
    SMTP Security None
    SMTP Port * 587 (also tried 25)
    SMTP Username admin@domain.co.uk
    SMTP Password correct pass
    SMTP Host auth.smtp.1and1.co.uk

is there anything I can do to stop this?
JoomlaContent ManagementWeb Languages and StandardsWeb Development

Avatar of undefined
Last Comment
Member_5340450

8/22/2022 - Mon
mrwad99

Carriage return then line feed, CRLF, what you are seeing above, is apparently the expected end-of-line marker for most internet protocols,  so Joomla is behaving correctly.

Why is \r\n a problem for you?
flynny

ASKER
sorry i understand what these symbols are. It is just when an email is received they are appearing a \r\n instead of the CRLF.
mrwad99

In that case it is down to your Email client not interpreting the characters correctly.  What client are you using?
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
flynny

ASKER
outlook all other html emails etc are coming through ok?

I would have thought it would interpret this??
mrwad99

Hmm.  Does this link help at all?
flynny

ASKER
Hi,

Thanks for the link.

I've tried pulling the fix out and adding it to the /languages/phpmailer/stmp.php i.e.

	$CRLF = wordwrap($CRLF, 70); // Just to be safe that SMTP-send works
	$CRLF = str_replace('\r\n', "\r\n", $CRLF); // Replace Windows breaks (rn)

Open in new window


to the __construct() method but this has changed anything.

As the link is for the cb_builder plugin I am not sure what else to change? (I assume this is the right file :) )
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
mrwad99

I am at a loss now, I am afraid.  I suggest you request additional attention using the "Request Attention" link above.

Sorry I can't help any more.
jrm213jrm213

Hi,

Just a thought, but did you change the email to send as HTML? If so, replace the /r/n with <br/>
Ray Paseur

Maybe the \r\n are enclosed in single quotes?  If so, try changing them so they are enclosed in double quotes like " instead of '
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
AndyAinscow

I'm puzzled.  Exactly what is the problem?
In the question you state you have \r\n rather than a newline.  Later you say you don't see the CRLF.

I'm probably repeating bits of earlier comments here:

\n is a newline (also called line feed)
\r\n is a carriage return and new line pair of characters
CRLF is a shorthand for Carriage Return Line Feed which is \r\n
In code one might have a mcaro called CRLF which expands to \r\n - on viewing a string the \r\n does NOT get printed out as CRLF
ASKER CERTIFIED SOLUTION
Member_5340450

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question