Jump to content

attach generated file


dflow

Recommended Posts

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);

 

  }

?>

 

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.