MemberControls - Password reminder ignores line-breaks ( \r\n )? Options
kalpa
Posted: Wednesday, November 07, 2007 10:05:27 PM

Rank: Fanatic

Joined: 7/19/2006
Posts: 496
Location: Göteborg, Sweden
Hi!

I'm currently creating a login page with PW reminder via the MemberControls.

In the field for EmailBody I've entered (but in Swedish):

Code:
Hej %%NAME%%! \r\n This is your login credentials! \r\n Password: '%%PASSWORD%%' \r\n Username: '%%USERNAME%%'"


But my line-breaks gets inserted as characters instead of line-breaks in the e-mail!?

What have I missed? Is the macro properties somehow behaving different from normal string variables?

// ; ) Kalle

" - Yeah I'd like to share your point of view, as long as it's my view too... (http://www.d-a-d.dk/lyrics/pointofview)
mortenbock
Posted: Thursday, November 08, 2007 12:03:50 AM

Rank: Addict

Joined: 7/19/2006
Posts: 811
Location: Århus, Denmark
Have you tried with <br /> tags instead? I'm not sure, but maybe the mail is sent as HTML?

Morten Bock - Level 2 certified - MVP 2008/2009 - My danish blog with a few english posts

kalpa
Posted: Thursday, November 08, 2007 5:31:37 PM

Rank: Fanatic

Joined: 7/19/2006
Posts: 496
Location: Göteborg, Sweden
Thanks for the suggestion Morten!

Unfourtunately it's a plain text message being sent...

I guess there's some escape sequence that isn't 100% correct...

// ; ) kalle

" - Yeah I'd like to share your point of view, as long as it's my view too... (http://www.d-a-d.dk/lyrics/pointofview)
chrism
Posted: Thursday, November 08, 2007 8:31:36 PM
Rank: Devotee

Joined: 1/11/2007
Posts: 57
can you do actual line breaks in notepad and copy in (i.e char(10) + char(13)).... sometimes that works for me, although outlook will helpfully strip them out half the time!
kalpa
Posted: Thursday, November 08, 2007 11:01:40 PM

Rank: Fanatic

Joined: 7/19/2006
Posts: 496
Location: Göteborg, Sweden
Eureka! That did the trick ; )

Actually I just hit the enter button in the template editor so that my code looked like:
Code:

<?UMBRACO_MACRO macroAlias="MemberControls-ForgotPassword" ErrorMessageNotFound="Unknown user" ConfirmMessage="A mail is heading your way" EmailFrom="robot@umbraco.dk" EmailSubject="Password reminder"
EmailBody=Hej %%NAME%%!
This is your login credentials!
Password: '%%PASSWORD%%'
Username: '%%USERNAME%%'

Best regards, Dr Umbraco
" </?UMBRACO_MACRO>


Even thought it is a pain in my aesthetic ego it does the trick ; )

Thanks for the suggestion!

// Kalle

" - Yeah I'd like to share your point of view, as long as it's my view too... (http://www.d-a-d.dk/lyrics/pointofview)
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.