email message in spam

im using yiiMailer extention…

i send email to both admin and user.But the two message are going in spam not in inbox…

why…? How can i set it…?

:blink: :blink: :( :(


Try to send mail using SMTP with login authentication… so enable SMTPAuth & choose SMTPSecure is SSL.

'SMTPSecure' => 'ssl',

'SMTPAuth' => true,


$mail->setSmtp('', 465, 'ssl', true, '', 'your_password');

thanks for you valuable reply…

im already defines this…the email going in spam…


First of all - contact email server administrator and check what are the rules that cause your emails to be reported as spam. If may be problem with:

  • not using SSL (but not likely)

  • sending emails from IP not enclosed in SPF

  • missing DKIM signature

  • content classified as spam by SpamAssassin on mail server

  • many other factors specific to your server and its admin imagination…

Now try to send any different email id and check their inbox. If still email is in spam so may be issue with your email id (which is you are using to sending emails and may it’s on black-listed ip).

Give your response here…

this is my codes

where is i change…?


public function actionContact()


	$model=new ContactForm;








            $subject='my subject';

            $headers="From: $name <{$model->email}>\r\n".

                "Reply-To: {$model->email}\r\n".

                "MIME-Version: 1.0\r\n".

                "Content-Type: text/plain; charset=UTF-8";


			$mail = new YiiMailer();








				$autoemail = new YiiMailer(); 

				$autoemail->From = Yii::app()->params['adminEmail']; 

				//$autoemail->FromName = $adminname; 


				$autoemail->FromName = $adminname; 

				$autoemail->Subject = ($subject); 


				$autoemail->Body = "We received your submission. We will contact you soon ...";




                             Yii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');






				Yii::app()->user->setFlash('error','Sorry your message cannot be send... ');























	// this is used in contact page



im change another valid emails…not working…

any technichal problems…?

I prefer you use this extension, it’s work for me fine…

Put in your config (main.php)-









	    'SMTPSecure' => 'tls',


Your mail sending code (Put in your view or controller as per the use) -

$to = ''; //Email id, which you want to send an email

$from= ''; //Email id, provide your email id


$mail->SetFrom($from, 'Yii Demo');

$mail->Subject = 'your email subject';


$mail->AddAddress($to, "");



Extension Link -

thanks a lot…

its working fine…thanx…

don"t forget to vote this post !

THANKS Rohit this wiki is very helpfull :)

Enjoy dude::)

Your welcome::)