PEAR Packages
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPEAR Packages

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old May 4th, 2007, 01:32 PM
makkura makkura is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: May 2007
Posts: 8 makkura User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 57 m 2 sec
Reputation Power: 0
Mail & SMTP?

I've got a mail script that I've been trying to get working properly.
Thanks to help from the forums here, I have all the proper includes now.

I have several print outs in the code to be sure it gets to certain points, and the die statements don't show anything so I'm pretty certain it is completing.
The recipient in the TO line isn't receiving it, however.

The server I'm working on hasn't been configured by the company but they say that SMTP should route from it properly within their domain (the server is in their network and the email goes to an email address within their network).

There are a lot of configuration issues I'm probably not aware of so I know I'm asking a lot here but I feel it's worth a shot to see what advice might help out.

The server is a Win2k3 box running Apache & PHP with PEAR.
IIS with SMTP is installed but questionably configured, though I don't even know if I need SMTP installed to use it with PEAR.

For the sake of code:
Code:
require_once "Mail.php";
$headers["From"]=$email;
$headers["To"]="recipient@domain.com";
$headers["Subject"]=$subject;
$recipients="recipient@domain.com";
$mailmsg=$question;
//Setup SMTP Infomation
$smtpinfo["host"] = "smtp.domain.com";
$smtpinfo["port"] = 25;
$smtpinfo["auth"] = true;
$smtpinfo["username"] = "username";
$smtpinfo["password"] = "password";	
//Create Mail Object
$mail_object =& Mail::factory('smtp', $smtpinfo) or die("Error: " . PEAR_Error::getMessage());
//Send Mail Object
$mail_object->send($recipients, $headers, $mailmsg) or die("Error: " . PEAR_Error::getMessage());


The domain specific information has been edited out, of course.
Also to be noted, I don't even know if they require authorization with a username and password as the IT department has been very unhelpful to this point.

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPEAR Packages > Mail & SMTP?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT