dflow Posted May 24, 2008 Share Posted May 24, 2008 hi i was wondering if anyone has bumped across a script that saves a file to the server, names it ,stores a copy on a folder and sends it as an attachment thx Link to comment https://forums.phpfreaks.com/topic/107052-attach-generated-file/ Share on other sites More sharing options...
jonsjava Posted May 24, 2008 Share Posted May 24, 2008 That wouldn't be too hard. can you give me your mail script(or whatever you have so far) so I can adjust it for you to allow for that? Link to comment https://forums.phpfreaks.com/topic/107052-attach-generated-file/#findComment-549006 Share on other sites More sharing options...
dflow Posted May 24, 2008 Author Share Posted May 24, 2008 That wouldn't be too hard. can you give me your mail script(or whatever you have so far) so I can adjust it for you to allow for that? hi thx for your reply i send a proposal to a client: i would like to store it with to a defined folder (SentProposals) with a defined name for example : ../SentProposals/proposal#2_Party_Jones.htm attach it and send it as an email attachment here is the mail i send , i trimmed the content: <?php /* grabs the POST variables and puts them into variables that we can use */ $CustomerFirstName=$_POST['CustomerFirstName']; // multiple recipients $to = '[email protected]' . ', '; // note the comma $to = $CustomerEmail ; // subject $subject = " Party: ".$CustomerFirstName . " " .$CustomerLastName; // To send HTML mail, the Content-type header must be set $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=utf-8' . "\r\n"; // Additional headers $headers .= 'To: mysite ltd <[email protected]>, mysite ltd <[email protected]>' . "\r\n"; $headers .= 'From: mysite <[email protected]>, Your Request is being processed <[email protected]>' . "\r\n"; // Mail it // message $message =' <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head> <body> <iframe src ="http://mysite.com/proposal.php?PID='.$ProductID.'" width="100%"> </tr> </table> </body> </html> '; $email = $_REQUEST['CustomerEmail'] ; if (!isset($_REQUEST['CustomerEmail'])) { } elseif (empty($email)) { } else { $url_success = "http://mysite.com/backoffice/main_screen.php?user=" . $HTTP_GET_VARS['user'] . ""; echo("<meta http-equiv = refresh content=0;url=".$url_success.">"); mail($to, $subject, $message, $headers); } ?> Link to comment https://forums.phpfreaks.com/topic/107052-attach-generated-file/#findComment-549202 Share on other sites More sharing options...
dflow Posted May 27, 2008 Author Share Posted May 27, 2008 BUMP!! i really need a solution for this thx Link to comment https://forums.phpfreaks.com/topic/107052-attach-generated-file/#findComment-551237 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.