$config = array(\'auth\' => \'login\',
\'username\' => \'****@gmail.com\',
\'password\' => \'****\',
\'port\
Its described in the manual of Zendframework
Zend_Mail::setDefaultTransport($transport);
Then somewhere else instanciate Zend_Mail
, write your mail and send it.
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('<a href = "http://localhost:8080/certificate/certificate-image/id/' . $id . '">my link</a>');
$mail->setFrom($certtime['email'], $certtime['first_name'] . $certtime['last_name']);
$mail->addTo($form->getValue('reciever'));
$mail->setSubject('My Certificate');
$mail->send($smtpHost);
See the documentation for full examples (although the Zend docs admittedly often aren't great).
Based on a comment here:
$mail = new Zend_Mail();
$tr = new Zend_Mail_Transport_Smtp(...);
$mail->setFrom('...', 'Server');
$mail->addTo($to, '....');
$mail->setSubject($subject);
$mail->send();
Zend_Mail::setDefaultTransport($tr);
$mail->setBodyText($body);