You are viewing the PKP Support Forum | PKP Home Wiki

Mail function not working

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.

Mail function not working

Postby hlazr001 » Thu Feb 08, 2007 12:39 pm


I am having some issues setting up the mail function in OJS. My environement is as follow:

Windows 2003 server
Apache 1.3.33
MySql 5.0
PHP 3.0
SMTP server that came with Windows

My problem is that the system is not sending any messages. I am not getting any error message. I have been reading about the different problems that were posted and I made these changes to the OJS config file:

; Use SMTP for sending mail instead of mail()
smtp = On
; SMTP server settings
smtp_server = mail.jgbc.fiu.edu
smtp_port = 25

; Enable SMTP authentication
; Supported mechanisms: PLAIN, LOGIN, CRAM-MD5, and DIGEST-MD5
; smtp_auth = PLAIN
; smtp_username = username
; smtp_password = password

; Allow envelope sender to be specified
; (may not be possible with some server configurations)
; allow_envelope_sender = Off

; Enable attachments in the various "Send Email" pages.
; (Disabling here will not disable attachments on features that
; require them, e.g. attachment-based reviews)
enable_attachments = On


Please advice,
Posts: 1
Joined: Thu Feb 08, 2007 12:18 pm

Postby asmecher » Thu Feb 08, 2007 2:32 pm

Hi Hamza,

You could try using the most recent CVS version of classes/mail/SMTPMailer.inc.php, available at http://pkp.sfu.ca/cvs/cvsweb.cgi/ojs2/classes/mail/SMTPMailer.inc.php; this version adds some error logging capabilities via PHP's error_log function.

Alec Smecher
Open Journal Systems Team
Don't miss the First International PKP Scholarly Publishing Conference
July 11 - 13, 2007, Vancouver, BC, Canada
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Re: Mail function not working

Postby mustafasacar » Wed Sep 26, 2007 8:47 am

Hi Alec,

My email function has not worked since 2-3 days. I dont know what I did, or changed? But I replaced with "most recent CVS version of classes/mail/SMTPMailer.inc.php". Now, when I try to send e-mail; system shows this error code --->>>
Warning: fsockopen() [function.fsockopen]: unable to connect to mail.akademikdizayn.com:25 in /home/akademik/public_html/classes/mail/SMTPMailer.inc.php on line 164

Warning: Cannot modify header information - headers already sent by (output started at /home/akademik/public_html/classes/mail/SMTPMailer.inc.php:164) in /home/akademik/public_html/classes/core/Request.inc.php on line 33

Please help me, I m in trouble.

Mustafa SACAR.
Posts: 12
Joined: Thu Apr 12, 2007 8:33 am

Re: Mail function not working

Postby asmecher » Wed Sep 26, 2007 9:41 am

Hi Mustafa,

OJS is unable to reach your mail server by the regular SMTP port (25). That means that network connectivity between you and the mail server is broken, or the mail server is not accepting regular SMTP. Perhaps you need to configure SMTP authentication information in your config.inc.php file.

Alec Smecher
Public Knowledge Project Team
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Re: Mail function not working

Postby mustafasacar » Wed Sep 26, 2007 12:32 pm

İn config.php, after I turned off the SMTP option, my e-mails has worked. Thanks for your interest.

Mustafa SACAR,MD.
Posts: 12
Joined: Thu Apr 12, 2007 8:33 am

Return to OJS Technical Support

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 2 guests