Calling a Function inside the SendMail



Hi Group - I have a function to send an email to a client after they
have successfully submitted a form on my site. I have a 2nd function
that prints their input to the browser as a confirmation.

I'd like to be able to include that print function inside my mail
message like this :

function sendToClient($email) {
$subject = 'Confirmation';
-----> $message = printConfirm($lang); <----
$headers = 'MIME-Version: 1.0' . "\r\n";
<snip>, etc
mail($to, $subject, $message, $headers);
}

This way I don't have to duplicate the output. The confirmation will
get printed to the browser AND the exact same content will be emailed.

When I executer this the email is blank.

Any expert ideas out there ?

.



Relevant Pages

  • Re: [OT] nested while - how to go to the beginning of the first while?
    ... When you request the tinyurl.com URL, your browser receives and follows an HTTP 302 redirect to the original, longer URL. ... Other "URL shortening" services acknowledge this problem and insert a time delay or confirmation before redirecting the client. ... the .htm should be of no reassurance - browsers will interpret content based on the HTTP Content-type header they receive, ...
    (comp.lang.c)
  • Re: forwarding a form to another server
    ... > my database for order management]. ... > etc the request times out. ... > confirmation screen [where the user says "Yes this is correct take me ... > the users' browser along as well. ...
    (alt.php)
  • Re: Deactivate browsers print function
    ... Selecting the "Print only blank pages" option will prevent visitors ... from printing your pages. ... Any time someone uses the print function, ... This function works with almost every CSS 2.0-enabled browser. ...
    (comp.infosystems.www.authoring.html)
  • Re: confirm in asp.net
    ... Or you could see if a confirmation is needed when rendering the first page ... and insert the javascript code that triggers this action when the event that ... browser, I creates an sql that checks something in a database, if there are ...
    (microsoft.public.dotnet.framework.aspnet)
  • [Full-Disclosure] Update: Web browsers - a mini-farce (MSIE gives in)
    ... a brief update on the status of reported sample vulnerabilities: ... independent fixes from OpenBSD team (DoS) ... no official confirmation, ... This means that VIRTUALLY EVERY BROWSER IN USE TODAY is unable * ...
    (Full-Disclosure)