I am using yii mail swiftmailer extension to send mail .when am using this mail extension along with ccaptcha validation in the same form the mail is not sending.when it has be used alone without captcha validation it is sending email.i need to send email using this extension along with the ccaptcha validation in yii.
for email:
$subjek="verifymail";
$from="[email protected]";
$getEmail="[email protected]";
$message= new YiiMailMessage;
$message->subject=$subjek;
$message->from=$from;
$message->setBody($activationlink, 'text/html');
$message->addTo($getEmail);
Yii::app()->mail->send($message);
I think you are missing port and host information in your code,unless you didnt show your whole code,see example here
If your host is gmail,put the port to 587 or 465
here is a question almost similar to your question