mail attachment problem???

Hi guys,

thanx in advance

We are sending a .pdf and .txt files as attachment but attacment content is blank page in case of txt file and could not open pdf file??If yuo have any idea please


We also tried Swift mailer extension

The code is as follows…


$plainTextContent = "This is my Plain Text Content for those with cheap emailclients ;-)\nThis is my second row of text";

$SM = Yii::app()->swiftMailer;

$mailHost = '';

$mailPort = 25; // Optional


	// New transport

$Transport = $SM->smtpTransport($mailHost ,$mailPort);


	// Mailer

$Mailer = $SM->mailer($Transport);


	// New message

	$Message = $SM

    	->newMessage('My subject')

    	->setFrom(array('' => 'Example Name'))

    	->setTo(array('' => 'Recipient Name'))

    	->addPart($content, 'text/html')




	// Send mail

	$result = $Mailer->send($Message);

In Morzilla browser i m getting error like this…

[html]Connection could not be established with host [Unable to find the socket transport "http" -

did you forget to enable it when you configured PHP? #-1401723312] [/html]

In my PHP config file Socket support is enabled ,OpenSSL support is also enabled…

It may be silly error but you find what is missing please tell…

Try to set the $mailHost without ‘http://’

$mailHost = '';