salve uso phpmailer per mandare una mail con allegato ma non allega il file, nonostante sia nella stessa cartella dove ho il file che manda la mail, penso che non faccia differenza che lo stia usando in drupal 6.
Grazie
Codice PHP:$mail = new PHPMailer(); // defaults to using php "mail()"
//$body = file_get_contents('contents.html');
//$body = eregi_replace("[\]",'',$body);
$mail->IsHTML(true);
$mail->IsSMTP(); // set mailer to use SMTP
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Host='my.smtp';
$mail->Username = "my";
$mail->Password = "my";
$mail->SetFrom('my@my.it', 'my');
$mail->AddAddress($address);
$mail->Subject = $oggetto;
$mail->Body = "<html><body> ";
$mail->Body.= $testo;
$mail->Body.= '</body></html>';
$mail->AddAttachment('logo.png'); // attachment
if(!$mail->Send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
drupal_set_message(t("Mailer Error: " . $mail->ErrorInfo));
} else {
drupal_set_message(t("Message sent!"));
}

Rispondi quotando