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!

Link to comment
Share on other sites

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

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.