Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Old 24th April 2012, 14:43
drbeat drbeat is offline
Junior Member
Join Date: Apr 2012
Location: Worcester, UK
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default phpmailer not working on Centos Webserver

Hi all,

Total Linux newbie here so please forgive my stupidity and fumbling! Sorry about the title but I'm at a slight loss to describe what my issue could be!

Back Story: Company I work for has decided to bring our external webhosting inhouse. I created a Centos VM based on this 'How to' article http://www.howtoforge.com/perfect-se...e2-ispconfig-3 (The Perfect Server - CentOS 6.2 x86_64 With Apache2 [ISPConfig 3]) hosting works perfect and I would have been lost without this guide! I have followed the article to the word! Websites work fine externally and internally.

Issue: some of the sites use PHP based 'contact us' forms which use a php file called class.phpmailer.php. These php based forms have ceased working since uploading the website files from the old external host to the company internal Centos box. Obviously there is a config difference between the external host's box and my Centos box but that is all I can figure out! When I use the forms, they appear to execute with the usual "thanks for your message, we'll get back to you" so no errors? In fact I don't where else to look for errors? The contact email addresses on the 'contact-us.htm' $mail (who the form contents are sent to) entries are correct but the users are not getting anything from the forms.

I'd like the class.phpmailer.php file to pass messages to our internal Exchange 2010 server which is enabled as an internal smtp relay for the webserver but, again, I cannot figure out how to do that.

The details of this class.phpmailer.php file is as following:

// PHPMailer - PHP email class
// Class for sending email using either
// sendmail, PHP mail(), or SMTP. Methods are
// based upon the standard AspEmail(tm) classes.
// Copyright (C) 2001 - 2003 Brent R. Matzelle
// License: LGPL, see LICENSE

* PHPMailer - PHP email transport class
* @package PHPMailer
* @author Brent R. Matzelle
* @copyright 2001 - 2003 Brent R. Matzelle
I've also attached the full file too.

Sorry for being such a newb, this seems like it should be pretty easy-ish to sort but I have no idea where to start argghh!!!

Thanks in advance

Attached Files
File Type: txt class.phpmailer.txt (46.7 KB, 131 views)

Last edited by drbeat; 24th April 2012 at 14:50.
Reply With Quote
Sponsored Links
Old 24th April 2012, 17:01
drbeat drbeat is offline
Junior Member
Join Date: Apr 2012
Location: Worcester, UK
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

I managed to solve this...doh! I used the following thread from http://www.linuxquestions.org/questi...server-109565/

This comment in particular worked:

Hmm, according to my Postfix book you should just need:

an entry in /etc/postfix/transport
mydomain.com smtp:

entry in /etc/postfix/main.cf
transport_maps = hash:/etc/postfix/transport

then I believe you need to run
postmap /etc/postfix/transport

One other thing I came across, you may want to set
default_transport = smtp

which should force Postfix to try SMTP delivery for anything not defined explicitly (this should defeat implicit local delivery).

WARNING: I have NOT tested ANY of the above. I'm just interpreting information from Postfix by Richard Blum, published by Sams.
Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems connecting my HTC Desire outgoing mail client to Postfix and ISP Config 2 j.smith1981 Server Operation 6 12th July 2010 20:07
auto update svn working copy donix Installation/Configuration 0 9th June 2010 21:59
Error 550 while trying to upload with FTP ebmar Installation/Configuration 11 23rd November 2007 17:56
SASL LOGIN authentication failed yupinho HOWTO-Related Questions 3 13th October 2007 04:00
Install ISPConfig on CentOS Server, in brief gfts Tips/Tricks/Mods 11 4th April 2006 09:29

All times are GMT +2. The time now is 05:39.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.