Page 1 of 1

Mail send Error Either Cant Connect or Server Error

Posted: Tue Feb 24, 2004 1:41 am
by saeen
hi thr
i have this pdf file i want to email .. this pdf file is generated dynamically.. i want to send it without saving the file...once the file is generated in a variabble like $pdf i want to email it rite away..for now i have saved the file and im sending it like this:
$content_type = "application/pdf";
$fd = fopen($filename, "r");
$data = fread($fd, filesize($filename));
fclose($fd);

$mail = new mime_mail;
$mail->from = "me@domain.com";
$mail->to = $email;
$mail->subject = "YLC Registration";
$mail->body = "Thank You for registering with us. Please download the attached .pdf invitation.";

$mail->add_attachment($data, $filename, $content_type);
$mail->send();

but this gives me two different types of errors
Warning: Failed to Connect in C:\apache\htdocs\ylc\php\mime_mail.inc on line 99
this is one of them i think this is coz of the smtp server defined in php.ini well i have tried different ones but it doesnt work...can any one tell me how to fix it or jus temme any smtp server that wud jus lemme send a mail to test if it works r not
plz help