Results 1 to 2 of 2
  1. #1

    generate an html page using php script?

    i'll get straight to subject:
    i'm using php mailer and gmail's smtp to send mail with php.

    part of the scipt provided by php mailer:

    $body = $mail->getFile('contents.html');
    $body = eregi_replace("[\]",'',$body);

    now when i tried to send mails with this script,it worked just great:

    $body = "my email is: " . $mail . "and my name is: " . $name ;

    the $mail and $name are just small forms.
    everything's nice and shiny...apparently!
    when i try to make the body like this:

    $body = $message ;

    $message being a textarea form, no mail ever arrives!

    now i tried to repair this for a while now,but i can't figure it out...
    now i think that using the original method,sending the contents.html is the best idea,because i can send nicer emails like with pictures,with a template and all of it!

    the real question:
    how can i generate a custom html page for every email send?
    like a php script to use the text from the textarea form and insert it in a specific place in the template, save the page like that and send it using the original script:

    $body = $mail->getFile('contents.html');
    $body = eregi_replace("[\]",'',$body);

    another question: saving the custom html file each time an email is sent will have a negative effect upon server's what?processor?like overloading? and how bad would the effect be for like 1-2 emails each day? rate the effect small, medium or big(i know that's relative but anyways...)

    ps: sorry for acting like a php noob (i just started learning it like two-three weeks ago) but please explain ma what does this do:

    $body = eregi_replace("[\]",'',$body);

    thanx in advance!

  2. #2
    i think my question is too vague and long...i'm going to ask a shorter, at the subject one...

Similar Threads

  1. Generate HTML/Static Pages from Dynamic Php Page
    By TheRealDeal in forum Programming Discussion
    Replies: 18
    Last Post: 12-18-2010, 09:28 AM
  2. Inserting html page in other html page & shared border problem
    By globalcashsite in forum Web Design and Content
    Replies: 9
    Last Post: 07-15-2009, 01:51 PM
  3. Can i call a shell script from a web page(HTML/PHP)
    By opva in forum Programming Discussion
    Replies: 3
    Last Post: 09-08-2004, 02:22 PM
  4. Make a php script show on a .html page?
    By 1jetsam in forum Programming Discussion
    Replies: 20
    Last Post: 05-10-2004, 03:41 PM
  5. Script to bring you back to where you were previously - for HTML page
    By Durianseller in forum Programming Discussion
    Replies: 2
    Last Post: 03-03-2003, 11:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts