Sending email via SMTP on zend framework

前端 未结 3 1125
没有蜡笔的小新
没有蜡笔的小新 2020-12-11 10:01
$config = array(\'auth\' => \'login\',
                \'username\' => \'****@gmail.com\',
                \'password\' => \'****\',
                \'port\         


        
3条回答
  •  孤城傲影
    2020-12-11 10:40

    Your example shows an empty link so it wont display anything.

    Unless this is a modified example you used to post on here?

    Does the following display anything when you run it, if not what do you get.

    $smtpHost = new Zend_Mail_Transport_Smtp('smtp.gmail.com', $config);
                    $mail = new Zend_Mail();
                    $mail->setBodyText($form->getValue('body'));
                    $mail->setBodyHtml('my link');
                    $mail->setFrom($certtime['email'], $certtime['first_name'] . $certtime['last_name']);
                    $mail->addTo($form->getValue('reciever'));
                    $mail->setSubject('My Certificate');
                    $mail->send($smtpHost);
    

提交回复
热议问题