Masalah pada SMTP email

pada hosting saya tidak mendukung konfigurasi SSL dengan Port 465 yang mana port tersebut tidak dapat dibuka dilayanan shared hosting saya berkaitan issue keamanan dari spamming…
bagaimana cara mengaktifkan SMTP selain menggunakan port tersebut ?

terimakasih

OJS can be configured to use whatever SMTP host and port is available to you. If your host does not allow SMTP over SSL with port 465, they probably support an alternate protocol, such as TLS on 587.

Check with your hosting provider for their preferred SMTP configuration, or use the configuration specified by your mail provider, if your mail provider is different than your hosting provider.

pihak hosting saya mendukung SMTP dengan configuration TSL port 587… bagaimana setting untuk port TSL ?

terima kasih

You should be able to set the smtp_port option to 587 in config.inc.php. Are you getting a specific error when you try to configure SMTP? If so, please let us know your version of OJS, your configuration settings, and the specific error message from your server’s error log.

1 Like

pengaturan configure SMTP di config.inc.php saya :

;;;;;;;;;;;;;;;;;;
; Email Settings ;
;;;;;;;;;;;;;;;;;;

[email]
; Use SMTP for sending mail instead of mail()
smtp = On

; SMTP server settings
smtp_server = “StartTLS://smtp.gmail.com”
smtp_port = 587

; Enable SMTP authentication
; Supported mechanisms: PLAIN, LOGIN, CRAM-MD5, and DIGEST-MD5
smtp_auth = PLAIN
smtp_username = “…”
smtp_password = “…”

Apakah sudah benar. ?

Saya using OJS 2.4.8.0.

Saya mendapatkan error.log sebagai berikut :

[03-Aug-2017 07:57:45 Asia/jakarta] ojs2 has produced an error
Message: WARNING: fsockopen(): unable to connect to StartTLS://smtp.gmail.com:587 (Unable to find the socket transport "StartTLS" - did you forget to enable it when you configured PHP?)
In file: /home/u3584193/public_html/ojs/lib/pkp/classes/mail/SMTPMailer.inc.php
At line: 134
Stacktrace:
Server info:
OS: Linux
PHP Version: 5.4.45
Apache Version: N/A
DB Driver: mysql
DB server version: 5.5.55-cll

Saya using OJS 2.4.8.0.

Saya mendapatkan error.log sebagai berikut :

[03-Aug-2017 07:57:45 Asia/jakarta] ojs2 has produced an error
Message: WARNING: fsockopen(): unable to connect to StartTLS://smtp.gmail.com:587 (Unable to find the socket transport “StartTLS” - did you forget to enable it when you configured PHP?)
In file: /home/u3584193/public_html/ojs/lib/pkp/classes/mail/SMTPMailer.inc.php
At line: 134
Stacktrace:
Server info:
OS: Linux
PHP Version: 5.4.45
Apache Version: N/A
DB Driver: mysql
DB server version: 5.5.55-cll

“StartTLS” is not a valid protocol. Your server may allow “tls://smtp.gmail.com:587”, but this would require that support for tls:// as a protocol scheme is enabled.

As last we knew, Gmail did allow SSL on port 465. A recommended configuration is documented here:
https://pkp.sfu.ca/wiki/index.php/Using_gmail_SMTP
Is your host blocking outbound connections on port 465? That is unusual.

1 Like

jadi bagaimana cara mengatasinya ?

benar hosting saya memblok Port 465 yang mana port tersebut tidak dapat dibuka dilayanan shared hosting saya berkaitan issue keamanan dari spamming.
apakah bisa jika menggunakan email yang tersedia dari hosting saya tanpa menggunakan gmail… dan bagaimana cara mengatur konfigurasinya?

Yes, you can use your hosting provider’s mail functionality. This is probably preferred, as they will likely handle most SPF and DMARC considerations for you. Ask them if PHP has permission to send mail directly. If so, just turn the smtp configuration “Off”. This will use PHP’s native mail function. If they have an SMTP settings they want you to use for their own SMTP server, they should be able to describe this configuration to you.

1 Like

pihak hosting saya menjawab Apabila konfigurasi OJS memang tidak dapat menggunakan smtp dengan port 587, maka coba konfirmasi kembali ke pihak ojs, bagaimana cara konfiguarsi pengiriman email dengan mengguanakan fungsi phpmail dan tidak menggunakan smtp.

apakah bila menggunakan phpmail, bisa mengirimka notifikasi otomatis atau email otomatis misalnya pada saat registrasi ?

bagaimana setting configuration SMTP seperti TLS pada 587.
misalnya menngnakan gmail maupun yahoo mail maupun email dari hosting sendiri

OJS will use PHP mail by default if you set smtp to “Off” in config.inc.php. This is probably the simplest and best solution.

smtp = Off

Otherwise, to configure OJS 2.x to use tls and port 587, try a configuration like:
smtp_server = tls://smtp.gmail.com:587

or

smtp_server = smtp.gmail.com
smtp_port = 587

OJS 3 offers an upgraded email sending solution.

Ask your system admin to open firewall port 465: ssl://smtp.gmail.com. maybe it cause double firewall or DMZ setting.