Email configuration trouble
Posted: 07 July 2007 09:52 AM   [ Ignore ]  
Grad Student
Avatar
Rank
Total Posts:  40
Joined  04-07-2007

In a fresh installation of EE 1.6.0 on IIs 6.0 / MySQL 5.0.41 / PHP 5.2.3 I cannot get Email configuration correct.  My attemts are as follows:

—————————————
#1
In a browser running on our Win2003-server hosting EE I configured CP Home ›  Admin ›  System Preferences ›  Email Configuration like this:

SMTP: smtp.innovia.dk   (this is a remotely hostet smtp-server, ie not on our LAN)
u: sm@innovia.dk
pw: xyzwq

From CP Home ›  Communicate I tried to send an email. 

Result: Infinite wait with this text in the bottom of Firefox :  “Waiting for bib.zeos.innovia.dk…” (this is EE’s root)
———————————————-
#2
To test the good functioning of ‘smtp.innovia.dk’ I used Outlook Express on the Win2003-server and configured outgoing mail exactly as in #1,

A test-mail was sent: Fine
——————————————-
#3
To be absolutely sure about correct about smtp-transport I configured a local SMTP-server (part of IIS on the Win2003-server) relaying to the remote SMTP server from #1. Paramters were:

smart host: smtp.innovia.dk
outbound security: u=sm@innovia.dk pw: xyzwq

I testet by throwing a simple txt-file containing from, to, and subject lines into C:\Inetpub\mailroot\Pickup.

It worked fine.
——————————————————

From this I conclude that smtp.innovia.dk is a fine smtp-server and the problem must be connected to EE.  So the question is:  What can I do to make EE’s mail configuration work?

Profile
 
 
Posted: 08 July 2007 06:53 AM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
RankRankRankRankRankRank
Total Posts:  6729
Joined  03-23-2006

OK, smtp doesn’t seem to work.  Is normal PHP mail() an option for you?  That would be the easiest to get up and running, and also the easiest to test.

Try setting CP Home ›  Admin ›  System Preferences ›  Email Configuration ›  Email Protocol to “PHP Mail”.

Also, try enabling Email Debugging while you’re in there.  Use the communicate tab to send a test message and see what it says.

 Signature 

DerekAllard.com - CodeIgniter, ExpressionEngine, and the World of Web Design
BambooInvoice - Open Source, CodeIgniter powered invoicing.

Profile
MSG
 
 
Posted: 08 July 2007 07:13 AM   [ Ignore ]   [ # 2 ]  
Grad Student
Avatar
Rank
Total Posts:  40
Joined  04-07-2007

No, PHP mail does not work.  Email debugging returns this message: “Debugging Message
Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.”

This puzzles me.  What kind of configuration should I undertake?

Profile
 
 
Posted: 08 July 2007 07:19 AM   [ Ignore ]   [ # 3 ]  
Administrator
Avatar
RankRankRankRankRankRank
Total Posts:  6729
Joined  03-23-2006

One final thing to try, Windows servers are notoriously picky and difficult.  Try this, include the following line to the index.php in your system diretory, and try again.

<?php
ini_set
('sendmail_from', 'webmaster@yoursite.com');
?>


Swap out that email address for a real one on your site.

If that doesn’t work, unfortunately, you’ll need to contact your web host, and ask them to enable the ability to send you mail.

 Signature 

DerekAllard.com - CodeIgniter, ExpressionEngine, and the World of Web Design
BambooInvoice - Open Source, CodeIgniter powered invoicing.

Profile
MSG
 
 
Posted: 08 July 2007 01:55 PM   [ Ignore ]   [ # 4 ]  
Grad Student
Avatar
Rank
Total Posts:  40
Joined  04-07-2007

Thanks Derek,
Even though your suggestion did not work for me, it initiated fruitful experiments.  I made this small script testing various ini_set and various headers:

<html><head><title>Test of PHPmail</title></head>
<
body>
   
<?php
    ini_set
('SMTP', 'gollum.innolan.local');   // private IP of server hosting EE

    
$to = "somebody@gmail.com" ;
    
$subject = "Testmail send at " . date("G:i") ;
    
$content = "-" ;
    
$headers = "From: myself@mycompany.dk" ;    // might also be part of php.ini

    
$bool = mail($to, $subject, $content, $headers);
    echo
$bool ? "Mailtest " . date("G:i") . " successful<br>" : "Mailtest failed<br>" ;
   
?>
</body></html>

For reasons unknown to me ini_set(‘SMTP’, ‘localhost’) did not work in my test-script.

So the solution to the EE mailing problem is to place ini_set(‘SMTP’, ‘local URL’)into system/index.php.  Which actually worked fine.

Profile
 
 
Posted: 08 July 2007 02:06 PM   [ Ignore ]   [ # 5 ]  
Administrator
Avatar
RankRankRankRankRankRank
Total Posts:  6729
Joined  03-23-2006

Wow, well done sm!

Windows servers… I’ve never had an easy time getting email to work.  Wonder why MS hates email so much wink

Glad you got it!

 Signature 

DerekAllard.com - CodeIgniter, ExpressionEngine, and the World of Web Design
BambooInvoice - Open Source, CodeIgniter powered invoicing.

Profile
MSG
 
 
Posted: 08 July 2007 02:31 PM   [ Ignore ]   [ # 6 ]  
Grad Student
Avatar
Rank
Total Posts:  40
Joined  04-07-2007

I fully agree. 

By the way I came to the conclusion that the line ini_set(‘SMTP’, ‘gollum.innolan.local’); should be placed in system/config.php as well as in system/index.php, because you also need mailing capacity in the public interface, not only cp.

I did so and emailing from both the weblog and the cp works fine.

Profile
 
 
Posted: 08 July 2007 02:32 PM   [ Ignore ]   [ # 7 ]  
Administrator
Avatar
RankRankRankRankRankRank
Total Posts:  6729
Joined  03-23-2006

Thanks for sharing sm.

 Signature 

DerekAllard.com - CodeIgniter, ExpressionEngine, and the World of Web Design
BambooInvoice - Open Source, CodeIgniter powered invoicing.

Profile
MSG
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 65027 Total Logged-in Users: 39
Total Topics: 82116 Total Anonymous Users: 25
Total Replies: 441311 Total Guests: 185
Total Posts: 523427    
Members ( View Memberlist )