Jump to content

How do I accomplish sending a parsed php file in an email ...


bsamson

Recommended Posts

Alright ... have a slight problem :)

 

I have an internal site for the company i work for. Every night all stores go to this web interface and goto "BREAKDOWN" to report some info at the store level. I have that form working and saving all info in the DB.

 

Now, every night that information needs to be emailed to 3 managers.

 

I can create a PHP script to display the info on a page within the site ... however I need that info emailed to these people everynight @ midnight. I understand I have to create a CROn job to accomblish this ... but I do not know how to create this email script!

 

Please any help would be GREATLY appreciated!

 

----------------------------------------

 

By the way, this information HAS to be included in the email ... in other words it cannot just email a link to the page. Thanks!

you can use output buffering to collect the page into a php var that you can write as the content of an html email

 

look into ob_start(). http://us.php.net/manual/en/function.ob-start.php

 

another way i've done it where a client wanted them to see the final paid invoice but have it emailed in html email, was i used

heredoc to store the content in a var then echo to webpage for them to see and use the var in email

 

http://us.php.net/manual/sl/language.types.string.php#language.types.string.syntax.heredoc

Archived

This topic is now archived and is closed to further replies.

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