Mandrillapp SMTP username brings this error

I use Mandrillapp for my websites and mail delivery. All of them work fine but when I want to use the smtp username with Discourse, it gives me this error:

./discourse-setup: line 383: [: too many arguments

Probably the reason is that my username consists from three words. It’s like ‘This Is Username’. However, how am I supposed to install Discourse if such a username is not supported? All of my other websites & forums work fine with this. Any help is appreciated. Thank you.

The immediate solution is that you’ll need to edit app.yml by hand with and editor like nano. Make sure that you surround your username with quotes. I’m not quite sure if there are other problems down the line with spaces in passwords.

I’ll add to my list to fix those tests in discourse-setup so that they aren’t broken by spaces.

3 Likes

I have tried both single quotes (‘SMTP Username’), double quotes (“SMTP Username”). In both cases, I did rebuild:

git pull
./launcher rebuild app

But nothing has worked. So I decided to setup a new SMTP with Elasticemail and now it works fine.

1 Like

Hmm. I wondered about that. That’s down stream of discourse-setup. have seen triple double quotes in some places

“”“password with space”""

I have a feeling it might have to do with the type of quotes used. It looks like there are what I call “curly quotes”.

In my experience, curly quotes look good in print media, but can cause problems when used in code.

True, the simple boring ASCII “straight quotes” may not look as nice, but for code they cause a lot fewer problems.

I don’t know where they are coming from (maybe they aren’t in the code and are being cooked in here?) but I think if you can not use them you’ll have less trouble.

2 Likes

Oh. You mean me. That’s what I get for trying to post from my phone. :slight_smile:

Edit: Oh, looking again, I think that it’s Markdown being clever.

1 Like