SMTP Configuration

Hi Anton,

I want to configure an SMTP for the users that want to recover their password. In the config.php I see this fields:

// SMTP configuration
$core_config[‘smtp’][‘relm’] = ‘’; // <---------------------- WHAT IS THIS?
$core_config[‘smtp’][‘user’] = ‘’;
$core_config[‘smtp’][‘pass’] = ‘’;
$core_config[‘smtp’][‘host’] = ‘localhost’;
$core_config[‘smtp’][‘port’] = ‘25’;

But I don’t really know how to configure it with Gmail (or Postfix) for example. Can you show me?

Cheers!

Hello, just use the following

$core_config[‘smtp’][‘relm’] = ‘gmail.com’; // yes, not realm, its relm
$core_config[‘smtp’][‘user’] = ‘yourusername@gmail.com’;
$core_config[‘smtp’][‘pass’] = 'yourpassword;
$core_config[‘smtp’][‘host’] = ‘smtp.gmail.com’;
$core_config[‘smtp’][‘port’] = ‘587’; (or 465 try both and check which one works out)

Thanks vmos,

**With the port 587 fails and I’m getting this log:

127.0.0.1 localhost 2015-10-28 14:26:35 PID56312f7b718f9 - L2 sendmail # start from: MyEmail@gmail.com to: DestinyMail@gmail.com subject:Password recovery
127.0.0.1 localhost 2015-10-28 14:26:36 PID56312f7b718f9 - L2 sendmail # end with error:server does not require authentication
127.0.0.1 localhost 2015-10-28 14:26:36 PID56312f7b718f9 - L2 forgot # u:postpaid email:DestinyMail@gmail.com ip:127.0.0.1 error_string:[Fail to send email]

**With the port 465 fails and I’m getting this log:

127.0.0.1 localhost 2015-10-28 14:32:00 PID563130c0aeccb - L2 sendmail # start from:MyEmail@gmail.com to:DestinyMail@gmail.com subject:Password recovery
127.0.0.1 localhost 2015-10-28 14:33:01 PID563130c0aeccb - L2 sendmail # end with error:it was not possible to read line from socket
127.0.0.1 localhost 2015-10-28 14:33:01 PID563130c0aeccb - L2 forgot # u:postpaid email:DestinyMail@gmail.com ip:127.0.0.1 error_string:[Fail to send email]

Do you have any idea what’s happening?

Cheers!

Hi,

Not sure about sending directly to gmail, but perhaps sending via mandrill, sendgrid, or postfix (then your postfix relay to gmail)

ref:

anton

The idea is that you should have already setup an mail server (exim, postfix, qmail, sendmail) which in return delivers your email to gmail.
Most linux servers are compiled with sendmail by default, so I suppose that your server is already setup with a mail server.
Do you know how to set up and config a mail server? if Yes have you test it? Can you send and receive emails?

If you don’t want to hassle with setting up a mail server, you should directly go to a paid service like sendgrid or mandrill. They will do the dirty job for you.

Anybody using GMail with PlaySMS? I was unable to setup.

I only got it working when I configured postfix between playsms and gmail

please can you share the configuration details ?