Jump to content

jsw1988eku

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

jsw1988eku's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I would like to incorporate a bare-bones file manager solution into our application. We would want to restrict clients from seeing each other's files and give them the ability to upload & remove files. The folder creation would be managed by our team. Any recommendations on a file management system? Thanks, Jeff
  2. Thank you. I nested tables and was able to add the style necessary to give the proper formatting to the html email. Jeff
  3. I tried inline w/CreateBody and GetMailMIME and neither utilized the proper formatting. Which function should I use w/inline. Thanks, Jeff
  4. I have been taking a crash course trying to learn php/html/javascript/jquery and am probably asking a fairly simple question. I installed phpmailer recently and have been able to send mail with attachments without a problem, but I am trying to make the body of the email HTML. Unfortunately each attempt the formatting is not preserved. I tried copying the same style that I use when I generate the same report to a web page, but it isnt translating to an html email. I have included the code that is relevant. Any glaring oversights? $htmlBody = '<html><head><title>Calls Yesterday</title></head>'; $htmlBody .='<style type="text/css"> body { font-family: Arial, Helvetica, sans-serif; font-size: 16px; } th { font-weight: bold; text-align: left; } td, th { padding: 15px 15px 15px 15px; width: 75px; vertical-align: top; text-align: left; } .outputData2 { margin-left: -10px; margin-right: -10px; width: 500px; } .outputData2 th { white-space: nowrap; text-align: left; padding-right: 10px; } .outputData2 td { white-space: nowrap; text-align: left; } a { text-decoration: none; color: #000; } strong { font-weight: bold; } </style> <br />'; $htmlBody .= '<div style="width: 640px; height: 500px; margin: 10px 0 0 0; padding: 10px; border: 1px solid #e3e3e3; overflow: auto" ><br />'; $htmlBody .= '<table cellpadding="0" cellspacing="0" align="center" class="outputdata2"><br />'; // $htmlBody .= '<table cellpadding="0" cellspacing="0" th="font-weight: bold; width: 25px; padding: 5px,5px,5px,5px; padding-right: 10px; text-align: left; white-space: nowrap;" td="padding: 5px,5px,5px,5px; width: 25px; text-align: left; vertical-align: top; white-space: nowrap;">'; $htmlBody .= '<th>Campaign</th><th>Number of Calls</th><th>Total Call Duration</th><th>Avg Call Duration</th><th>Call Status</th><br />'; // Setup mail class, recipients and body $mailer->AddAddress('me@mail.com', 'PHP Novice'); $mailer->Subject = 'Calls on '.$currentDate.''; $mailer->Body = $htmlBody; $mailer->IsHTML(true); $mailer->AltBody = $textBody; $mailer->AddAttachment($_SERVER['DOCUMENT_ROOT'].'/dashboardOld/campaignFiles/'.$prevClient."_".$currentDate.'.csv', ''.$prevClient."_".$currentDate.'.csv'); $mailer->AddAttachment($_SERVER['DOCUMENT_ROOT'].'/dashboardOld/campaignFiles/'.$prevClient."_".$currentDate.'.json', ''.$prevClient."_".$currentDate.'.json'); $mailer->Send(); $mailer->ClearAddresses(); $mailer->ClearAttachments(); $mailer->IsHTML(false); I even resorted to include the style sheet in what i passed to phpmailer because the formatting wasn't working when i coded the html settings withing $htmlBody originally. Any help would be appreciated. Thanks, Jeff
×
×
  • 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.