Page 1 of 1

Using PEAR Mail

Posted: Sat Nov 15, 2008 10:06 pm
by iceangel89
how exactly do i install and use PEAR Mail?

i installed PEAR Mail using cPanel (i attached an image)

then how do i use it? from what i Google-ed i need to include/require Mail.php (Net/Socket & SMTP also?)

so i did

Code: Select all

require_once "/home/xxx/php/Mail.php";
require_once "/home/xxx/php/Net/Socket.php";
require_once "/home/xxx/php/Net/SMTP.php";

Code: Select all

 
Warning: require_once(Net/Socket.php) [function.require-once]: failed to open stream: No such file or directory in /home/flashwe2/php/Net/SMTP.php on line 24
 
Fatal error: require_once() [function.require]: Failed opening required 'Net/Socket.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/flashwe2/php/Net/SMTP.php on line 24
huh? so i tried i add the folder Net containing Socket.php & SMTP.php into Net again... it looks like this
/home/xxx/php/Mail
/home/xxx/php/Net/Socket.php
/home/xxx/php/Net/SMTP.php
/home/xxx/php/Net/Net/Socket.php
/home/xxx/php/Net/Net/SMTP.php

then i get

Code: Select all

Fatal error: Cannot redeclare class Net_Socket in /home/flashwe2/php/Net/Net/Socket.php on line 592
i thought using require_once should require ONLY ONCE? y does it need to require again? i also noticed it might be because in /home/xxx/php/Net/SMTP.php it wants to include Net/Socket.php when it should be just Socket.php

please help

Re: Using PEAR Mail

Posted: Thu Nov 20, 2008 3:40 am
by iceangel89
anyone? or what do u use to send HTML mail?

normal mail()?

Re: Using PEAR Mail

Posted: Thu Nov 20, 2008 4:13 am
by Apollo
I use php's mail function most of the time, and sometimes PHPMailer (in my case to send mail through Gmail's SMTP server). Haven't looked at the latest version yet, but an earlier version was pretty much a matter of putting 2 php's on my server, and worked like a charm.