0

Possible Duplicate:
Sending email through Gmail SMTP using PHP

Hi,

I am working on a site, that uses mail() function of php to send emails. However the emails are not delivered properly as the server has got some problems. I want to use gmail server to send emails for this reason. How can i implement the php script to send emails using smtp server authentication? Also i have learnt that it uses pear package for email to send emails. How can I know that pear is installed on my remote server. The server doenot allow me to view php info()? Please help...

Community
  • 1
  • 1
Sanket Raut
  • 1
  • 1
  • 1
  • Getting error as Fatal error: Call to undefined method PEAR_Error::send() in /home/fpark/public_html/emailtest.php on line 25 – Sanket Raut Feb 26 '11 at 11:32

3 Answers3

1

Send email using the GMail SMTP server from a PHP page

I think it will be helpful.

Community
  • 1
  • 1
Abhishek
  • 2,095
  • 2
  • 21
  • 25
1

I use Pear Mail with SMTP is very easy, and you can see some examples

$_mailbox        =   Mail::factory('smtp', array( 
  'host'         => 'smtp.gmail.com', 
  'auth'         =>  FALSE, 
  'username'     => 'username@gmail.com', 
  'password'     => 'smtp_password', 
  'persist'      =>  FALSE  )); 

Sorry i don'r read all question, you can't know if you have pear in server, why not send email or ticket to support ?

fermin
  • 635
  • 7
  • 25
0

PHPMailer is a very good PHP library to send e-mails. You may just install the files into your own area, no administrator action is necessary.

ChrisJ
  • 5,161
  • 25
  • 20