Difference between revisions of "Using gmail SMTP"

From PKP Wiki
Jump to: navigation, search
(Add OJS3 configuration)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
To use gmail SMTP to send email from OJS system.  You can use the following setting in config.inc.php
 
To use gmail SMTP to send email from OJS system.  You can use the following setting in config.inc.php
  
 +
For OJS 2.x:
 
  <nowiki>
 
  <nowiki>
 
; Use SMTP for sending mail instead of mail()
 
; Use SMTP for sending mail instead of mail()
Line 14: Line 15:
 
smtp_password = "password"
 
smtp_password = "password"
 
</nowiki>
 
</nowiki>
 +
 +
For OJS 3.x:
 +
<nowiki>
 +
; Use SMTP for sending mail instead of mail()
 +
smtp = On
 +
 +
; SMTP server settings
 +
smtp_server = smtp.gmail.com
 +
smtp_port = 465
 +
 +
; Enable SMTP authentication
 +
smtp_auth = ssl
 +
smtp_username = "user@gmail.com"
 +
smtp_password = "password"
 +
</nowiki>
 +
 +
Note that using gmail to deliver email will result in all emails being addressed "from" your gmail account, rather than the OJS user who initiated the email. You may wish to consider patching http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=8085 to allow existing installs to include a configurable prefix in email templates explaining that the message is being sent on behalf of your journal, press, or conference.
 +
 +
Note that you may have to additionally configure application-specific passwords in gmail; see https://support.google.com/accounts/answer/185833?hl=en for details.

Latest revision as of 12:21, 12 December 2017

To use gmail SMTP to send email from OJS system. You can use the following setting in config.inc.php

For OJS 2.x:

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

; SMTP server settings
smtp_server = "ssl://smtp.gmail.com"
smtp_port = 465

; Enable SMTP authentication
smtp_auth = PLAIN
smtp_username = "user@gmail.com"
smtp_password = "password"

For OJS 3.x:

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

; SMTP server settings
smtp_server = smtp.gmail.com
smtp_port = 465

; Enable SMTP authentication
smtp_auth = ssl
smtp_username = "user@gmail.com"
smtp_password = "password"

Note that using gmail to deliver email will result in all emails being addressed "from" your gmail account, rather than the OJS user who initiated the email. You may wish to consider patching http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=8085 to allow existing installs to include a configurable prefix in email templates explaining that the message is being sent on behalf of your journal, press, or conference.

Note that you may have to additionally configure application-specific passwords in gmail; see https://support.google.com/accounts/answer/185833?hl=en for details.