Jump to content

fpdf and phpmailer


dolcezza

Recommended Posts

I am a newbie at php and trying to generate a pdf, then email it.

If I have the output() line it works fine....prompts me to download the pdf and everything is in there.

 

When I add the mail part I get a blank page in the browser and no email. Any suggestions appreciated.

Only posting relevant part of code

 

require('fpdf.php');
$filename="bookingconfirmation.pdf";
//rest of pdf code here

$pdf->Output($filename);

include "libMail/class.phpmailer.php";
$m= new Mail; // create the mail
$m->IsSMTP(); // telling the class to use SMTP
$m->Host = "mail.connectingauthors.com"; // SMTP server
$m->From("susan@connectingauthors.com");
$m->To("pixelart@optonline.net");
$m->Subject( "Connecting Authors Booking Confirmation" );
$m->Body( "HellonnPlease find attached ..." ); // set the body
$m->Attach( $filename ) ;
$m->Send(); // send the mail
exit();

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.