2

有人可以建议我从哪里下载zend框架和使用gmail smtp和zend in php发送邮件的代码吗?请...

4

1 回答 1

1

您将希望从以下网址下载 Zend Framework:http
://www.zend.com/community/downloads 您将发送如下电子邮件:

<?php 
$options = array(
        'auth'     => 'login',
        'username' => '_username_@gmail.com',
        'password' => '_password_',
        'ssl'      => 'tls',
        'port' => 587
    );
    $mailTransport = new Zend_Mail_Transport_Smtp('smtp.gmail.com', $options);
    Zend_Mail::setDefaultTransport($mailTransport);

    $m = new Zend_Mail();
    $m->addTo('someone@gmail.com');
    $m->setFrom('_username_@gmail.com', 'Sender name');
    $m->setSubject('Using Gmail SMTP');
    $m->setBodyText('Hello! I am using Gmail from the localhost :)');
    $m->send();
于 2010-09-07T20:24:28.357 回答