Question

I have installed Xampp for ubuntu. It is located in /opt/lampp. I want to configure the php.ini and sendmail.ini files so that i will be able to send mail using the gmail smtp server. The php.ini is located in /opt/lampp/etc, but I can't find the sendmail.ini file. Also most of the resources on stackoverflow were for Windows. Could someone point out the configuration for ubuntu and xampp server. Thanks a lot.

Was it helpful?

Solution

use zend_mail instead to send mail using gmail config

$settings = array('ssl'=>'ssl',
                                'port'=>465,
                                'auth' => 'login',
                                'username' => 'youremail@gmail.com',
                                'password' => 'YOUR_PASSWORD');
                $transport = new Zend_Mail_Transport_Smtp('smtp.gmail.com', $settings);
                $email_from = "YOUR_EMAIL";
                $name_from = "YOUR NAME";
                $email_to = "TO_EMAIL";
                $name_to = "TO NAME";

                $mail = new Zend_Mail ();
                $mail->setReplyTo($email_from, $name_from);
                $mail->setFrom ($email_from, $name_from);
                $mail->addTo ($email_to, $name_to);
                $mail->setSubject ('Testing email using google accounts and Zend_Mail');
                $mail->setBodyText ("Email body");
                $mail->send($transport);

http://blog.josedasilva.net/zend-framework-sending-emails-using-zend_mail-and-google-smtp/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top