You are here: phpmail and attachments « PHP Programming Language « IT news, forums, messages
phpmail and attachments

Posted by p cooper on 08/11/06 10:58

Im trying to send an email + attachment from a linux box on my desk,
through the exchange server at work

require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->SetLanguage("en", "/usr/lib/php/");
$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host = "10.138.0.5"; // Exchange server
$mail->From = "John.Doe";
$mail->AddAddress("John.Doe");
$mail->Subject = "CCMDS form";
$mail->Body = "CCMDS form";
$mail->WordWrap = 50;
#$mail->AddAttachment("/tmp/fpdf.pdf");
if(!$mail->Send())
{ echo "Message was not sent";
echo "Mailer Error: " . $mail->ErrorInfo;}
else
{ echo "Message has been sent";}



works as long as the attachment isnt added - as soon as I uncomment the
AddAttachment line I get the 'message' sent but nothing appears at the
other end and I get no bounce/error message

anyone know whats wrong ?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация