Using PEAR Mail

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
iceangel89
Forum Commoner
Posts: 39
Joined: Mon Jul 02, 2007 7:02 pm

Using PEAR Mail

Post 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
Attachments
11-16-2008 11-58-11 AM.png
11-16-2008 11-58-11 AM.png (26.58 KiB) Viewed 868 times
iceangel89
Forum Commoner
Posts: 39
Joined: Mon Jul 02, 2007 7:02 pm

Re: Using PEAR Mail

Post by iceangel89 »

anyone? or what do u use to send HTML mail?

normal mail()?
User avatar
Apollo
Forum Regular
Posts: 794
Joined: Wed Apr 30, 2008 2:34 am

Re: Using PEAR Mail

Post 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.
Post Reply