Re: Send Mail from PHP Using SMTP Authentication

Toby Hart Dyke <[email protected]>
Newsgroups gmane.comp.php.windows
Message-ID <[email protected]>
On 4/13/2010 2:54 PM, Alice Wei wrote:
> I tried installing the Pear Mail package, it is now located in
>
> php/PEAR/Mail, and my code is located in the htdocs. Here is the code:
>
> $host = "smtp.att.yahoo.com";
>    
Although you have other problems (see below) this is unlikely to work. 
When sending email, you need to either authenticate yourself with the 
server, or use an SMTP server in your local domain (which *may* accept 
all mail without authentication). This will be a mail server run by your 
ISP.

Given your email address domain (iu.edu) you should probably try 
mail.iu.edu or smtp.iu.edu, or just ask your local administrator where 
you should be sending email, and if you need to authenticate.

All that said, you define $host, but don't seem to use it anywhere. I've 
never used the Pear Mail package, so can't tell you where that should go.
> Fatal error:  Class 'Mail' not found in C:\xampp\htdocs\Alice.Wei\web\mail.php
> >set the PEAR path to your include_path in your php.ini
>
> I did have that. I have include_path = ".;C:\xampp\php\PEAR;". Do I have to physically type in pear install Mail to install the Mail package here?
>    
Did you restart the web server after changing that? Changes to the 
server php.ini won't get picked up until a restart.

   Toby


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.