Config error - Parse error: syntax error, unexpected T_STRING

Trying to setup backup smtp server, but config complains.

Parse error: syntax error, unexpected T_STRING in /home/wellnow/public_html/scout/lists/config/config.php on line 568

line568: $phpmailer smtpuser = ‘’;

does phplist not recognize “@” and “.” sysmbols ? If so, how to have php ignore them and continue ?


When you get a parse error, it often refers to the line prior to the one referenced, so have a look at the lines 560-570 and can you please show us them.

Also, have you missed the underscore between $phpmailer and smtpuser ?

Most near lines before, and after are #'d out.

I googled php and “@”…says php treats “@” as ignore errors. What does that do to the PHPlist config when login user consists of an email address ?

line 557: define(“PHPMAILERHOST”,‘’);
line 568: $phpmailer smtpuser = ‘’;
line 569: $phpmailer smtppassword = ‘xxxdf12bbff6e203f2938181f54xxx’;

I don’t know what you mean by underline between user & password…config doesn’t have any except when I’m in edit mode.


Have you copied and paste the above line, or typed it in afresh? It should be:
$phpmailer_smtpuser = ‘’;

Ditto the line below it:
$phpmailer_smtppassword = ‘password’;

Also, what program are you using to edit the config.php file?

I found that out earlier today. My editor was removing “_” for some reason. So I fixed that. Gave me back the PHPlist login, and script. I was using BlueFish editor. I’ve now downloaded Scite Editor to use with config.

PHPlist however still not connecting with their smtp server. I’ve been chatting both here, and with their support folks. All seem to be stumped.

Do me a favor and load $phpmailer_smtpuser with an email address on your system to see if you can tell anything regarding how PHPlist script is handling the “@” symbol.


Another Question…is there a set number of characters that can be set in the user & password fields ?

Thinking because their settings are so long…any chance they are being chopped ?


Not to the best of my knowledge. :confused:

I’m stumped. Nothing seems to get PHPlist to connect with their smtp server ?

Only other thought is that list is parsing user & password fields incorrectly.

Their server is identifying the user field as a login field not user.

What would happen if I added an entry in config as follows:


Then I could do the settings as:

phpmailer_smtpuser = postmaster

phpmailer_smtplogin = ‘’;

phpmailer_smtppassword = ‘xxx8a5e1026600ae3f61922763adxxx’;

Question …would list config parse the extra field to end up with their orginal login ?:



W-E-L-L…I tried adding $phpmailer_smtplogin = ‘’; and that doesn’t work either…no indication that it connects to smtp, and sends any emails.

Seems like there should be some way to get this to work ?

I need a N-A-P !


One of their support folks has volunteered to download PHPlist 3.0.12 to their server to experiment with, and hopefully find a solution for the login problem…keep your fingers crossed. I’ll let you know what the results are.


Thanks for the update. There are two issues here, what is needed to login to mail gun, and what do you put in the config.php file.

You should use thunderbird to first verify all the settings, then work on the config.php file

to login to mailgun smtp:

IP Address
SMTP Hostname
Default SMTP Login
Default Password

what PHPlist config entries are:

$phpmailer_smtpuser = ‘’;
$phpmailer_smtppassword = ‘xxxxdf12bbff6exxxxf2938181f54xxxx’;

I have tried ports: 25; 465/ssl; 587/tls and without tls

…and yes I have double checked config so many times
I’m going blind.

I’m still leaning toward the problem being config doesn’t know how to handle their email address login…but I’m no expert.


See this post in the old forums for how to enable smtp debug.

Also, I suggest that you review the examples in the phplist config file as there are specific entries for the smtp port and for using secure connections. Your syntax might work but following the examples is probably better.

These values along with your smtp user and password work for me

define('PHPMAILER_SECURE', 'ssl');
define('PHPMAILERPORT', 465);

If they do not work for you then possibly the outgoing port is blocked.
You should remove the user and password from your earlier post.

Thanks…at least now I know it’s not the “@” symbol…and those settings worked for you.

That leaves two possibilities…cPanel changes…and possible port blocking by my hosting company.

I will concentrate on those.


Duncan…what were you using when you managed to send the 2 test emails…PHPlist or some other program ?

Mine still not connecting to their server…connection refused.

Telnet makes connection, but refuses sending email ?


I got debug to provide a little more info:

2015-05-13 20:01:07 SMTP ERROR: Failed to connect to server: Connection timed out (110) 2015-05-13 20:01:07 SMTP connect() failed.

I did increase smtp timeout from 5-15 secs…no change.


I just switched back to our blacklisted primary maill server to be sure config file had no other problems. Test mail arrived successfully…so config isn’t our problem.


Yes, using phplist I successfully connected and sent a test message.
This looks to be your local network is blocking the connection. So it is not to do with phplist.

F-I-N-A-L-L-Y…hosting company whitelisted ports 25 & 465. Everything is working now after nearly 2 weeks.