Jump to content

kamaxo

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

kamaxo's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. This is my code. include("Mail.php"); include("Mail/mime.php"); $text = ""; $html = "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'> <html xmlns='http://www.w3.org/1999/xhtml'> <head> <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' /> <title></title> <style type='text/css'> #footer {0 0 repeat-x ; width:90%; font-family:'lucida grande',tahoma,verdana,arial,sans-serif; font-size:10px; text-transform:uppercase; padding:2px; } </style> </head> <body> <div align='center'> $msg </div> </body> </html>"; $crlf = "\r\n"; $hdrs = array( "From" => $emailempresaprincipal->email, "Subject" => $subj , "To" => "$to", "Cc" => "$cc_", "Bcc" => "bcc_" ); $mime = new Mail_mime($crlf); if ($ficheiro_){ foreach($_FILES['ficheiro_']['name'] as $key => $name) { $tipo = substr($_FILES['ficheiro_']['type'][$key], 0, 5); $dirmail = "c:/wamp/www/portal/documentacao/"; $dir = '../documentacao/'; $nomedocumento_ = date("Ymd") . date("His") . "-"; ficheiros ="$dir". $_FILES['ficheiro_']['name'][$key]; $mime->addAttachment($dirmail . $nomedocumento_ . $_FILES['ficheiro_']['name'][$key]); } $mime->setTXTBody($text); $mime->setHTMLBody($html); $body = $mime->get(); $hdrs = $mime->headers($hdrs); $recipients = $to.", ".$cc . ", ". $bcc_; $mail =& Mail::factory("smtp"); $mail->send($recipients , $hdrs, $body);
  2. hi there. this is my first post. i'm sory for my english (i'm portuguese) i have i very bad situation. on my code. i'm sending an email from my aplication and when arrives to the client the Attachments is send with the extension ".dat". in my pc the email is sent correct. but from other pc (server) the extension arrives ".dat". does anyone have the same problem ??? please help me. tnks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.