PDA

View Full Version : "Forgot password" line breaks not working


coryk246725
05-04-2009, 03:58 PM
Hi guys,

I'm trying to use the Forgot Password feature of SecurityAssist for the first time. Everything seems to be working peachy-keen except that the line breaks in the mailBody parameter are not being observed in Gmail or Thunderbird (and, I can only assume, other webmail providers as well as other mail clients like Outlook). I can clearly see the line break characters (\n) in the source code, but they are not actually producing line breaks.

Does anyone know how I might fix this? Is it a glitch with the hosting company or maybe a bug in the SecurityAssist files?

Any help is appreciated.

Cory

Danilo Celic
05-05-2009, 08:05 AM
When you say you see the \n in the source code, do you mean in the source code that sends the email, or the source code of the received email? If the later, then I believe that that should not be happening. I'd suggest submitting a support incident (http://www.webassist.com/mywebassist/techsupportinsert_1.php) as our support folks will know of a solution if this has been seen before, or can help with finding a solution if it something new.

coryk246725
05-05-2009, 08:39 AM
Thanks for your reply, danilo.

What I mean is that I can see the line break code (\n) in the $WA_Auth_Parameter array where I specify the message to the person who forgot his password, yet it doesn't seem to do anything.

Here's the entire line of code in question:

"mailBody" => "[firstname], your password is: [password].\n\nTo log in, visit http://www.example.com/login\n\nThank you.",

Despite the presence of those line breaks (\n\n), the entire line runs together in the actual e-mail that I receive when I test, even though I know it should force a line break in the e-mail.

Thanks again for your help!

Danilo Celic
05-05-2009, 01:10 PM
It may be that the mail client is interpreting the email as HTML rather than as plain text, which isn't something that mail itself can control, unless you were to move to using Universal Email and sending an HTML email with the password in it instead.

I'm not really familiar with the email sending code, so this issue may be better off as a support incident (http://www.webassist.com/mywebassist/techsupportinsert_1.php).

Ray Borduin
05-05-2009, 03:41 PM
It is probably sending as html... try using <br> tags instead of line breaks.