+ Reply to Thread
Results 1 to 13 of 13

Thread: email page
      
   

  1. #1
    Maddog's Avatar
    Maddog is offline Lieutenant Colonel
    Join Date
    May 2005
    Location
    UK
    Posts
    514

    Question email page

    hello the great Pablo and gang

    Try to send page automaticly by email

    i.e on entering an email address the content of the page is sent in the email body

    can this be done?

    I know you have to link to a file?

    Just not sure how to
    www.bluevodaexchangelink.com
    BluevodaExchangeLink Help Center
    Bluevodaexchangelink Forum

    The only place for bluevoda site to be linked with!

  2. #2
    Pablo is offline Moderator
    Join Date
    May 2005
    Posts
    507

    Default

    Can you give some more details what you want to do?
    I guess you do not mean the regular email forms we have discussed thousands of times on the forum?
    What do you mean by 'automaticly'?
    Forum Moderator
    BlueVoda Specialist

  3. #3
    Stroke.nz's Avatar
    Stroke.nz is offline The Man
    Join Date
    May 2005
    Location
    New Zealand
    Posts
    188

    Smile

    Hi Pablo

    Simons talking about Building portable website's to send via email.

  4. #4
    Stroke.nz's Avatar
    Stroke.nz is offline The Man
    Join Date
    May 2005
    Location
    New Zealand
    Posts
    188

    Default

    and this as well lol> Create and Send HTML Email

  5. #5
    Maddog's Avatar
    Maddog is offline Lieutenant Colonel
    Join Date
    May 2005
    Location
    UK
    Posts
    514

    Default

    Pablo,

    have recipes on web site, people view the recipe can print out or email to them self or other people the recipe, what to auto the recipe into the email when sent
    www.bluevodaexchangelink.com
    BluevodaExchangeLink Help Center
    Bluevodaexchangelink Forum

    The only place for bluevoda site to be linked with!

  6. #6
    Pablo is offline Moderator
    Join Date
    May 2005
    Posts
    507

    Default

    Yes, it's possible, but I do not think it's within the scope of BlueVoda.
    If I understand it correctly you want to build a dynamic website, sending content based on the user's input.
    Although you can build the forms and HTML templates using BlueVoda, you will have to figured some PHP code, that controls what and how everything is managed, maybe you can even use MYSQL to store your data in.
    I'm sure you will find some great examples by searching on Google, but t probably will not be a matter of cut and paste into BlueVoda to get it all working.
    Forum Moderator
    BlueVoda Specialist

  7. #7
    Maddog's Avatar
    Maddog is offline Lieutenant Colonel
    Join Date
    May 2005
    Location
    UK
    Posts
    514

    Default

    thanks
    www.bluevodaexchangelink.com
    BluevodaExchangeLink Help Center
    Bluevodaexchangelink Forum

    The only place for bluevoda site to be linked with!

  8. #8
    Maddog's Avatar
    Maddog is offline Lieutenant Colonel
    Join Date
    May 2005
    Location
    UK
    Posts
    514

    Default

    Pablo,

    I got his far,

    <?php
    function mail_attachment($filename, $path, $mailto, $from_mail, $from_name, $replyto, $subject, $message) {
    $file = $path.$filename;
    $file_size = filesize($file);
    $handle = fopen($file, "r");
    $content = fread($handle, $file_size);
    fclose($handle);
    $content = chunk_split(base64_encode($content));
    $uid = md5(uniqid(time()));
    $name = basename($file);
    $header = "From: ".$from_name." <".$from_mail.">\r\n";
    $header .= "Reply-To: ".$replyto."\r\n";
    $header .= "MIME-Version: 1.0\r\n";
    $header .= "Content-Type: multipart/mixed; boundary=\"".$uid."\"\r\n\r\n";
    $header .= "This is a multi-part message in MIME format.\r\n";
    $header .= "--".$uid."\r\n";
    $header .= "Content-type:text/plain; charset=iso-8859-1\r\n";
    $header .= "Content-Transfer-Encoding: 7bit\r\n\r\n";
    $header .= $message."\r\n\r\n";
    $header .= "--".$uid."\r\n";
    $header .= "Content-Type: application/octet-stream; name=\"".$filename."\"\r\n"; // use diff. tyoes here
    $header .= "Content-Transfer-Encoding: base64\r\n";
    $header .= "Content-Disposition: attachment; filename=\"".$filename."\"\r\n\r\n";
    $header .= $content."\r\n\r\n";
    $header .= "--".$uid."--";
    if (mail($mailto, $subject, "", $header)) {
    echo = "mail send ... OK"; // or use booleans here
    } else {
    echo = "mail send ... ERROR!";
    }
    }
    // how to use
    $my_file = "Apricot.txt";
    $my_path = $_SERVER['DOCUMENT_ROOT']."/http://www.easttilburyinfantschool.com/recipts/";
    $my_name = "simon";
    $my_mail = "simon.dawkins@btinternet.com";
    $my_replyto = "webmaster";
    $my_subject = "This is a mail with attachment.";
    $my_message = "Hello,\r\n hope you like the recipe I.\r\n\r\n Eastilburyinfantschool";
    mail_attachment($my_file, $my_path, "recipient*****.org", $my_mail, $my_name, $my_replyto, $my_subject, $my_message);
    ?>

    however I am getting the following error

    Parse error: parse error, unexpected '=', expecting ',' or ';' in /home2/easttilb/public_html/send.php on line 27



    from then on lost
    www.bluevodaexchangelink.com
    BluevodaExchangeLink Help Center
    Bluevodaexchangelink Forum

    The only place for bluevoda site to be linked with!

  9. #9
    Pablo is offline Moderator
    Join Date
    May 2005
    Posts
    507

    Default

    I see a few errors:
    echo = "mail send ... OK";
    should be
    echo "mail send ... OK";

    echo = "mail send ... ERROR!";
    should be
    echo "mail send ... ERROR!";

    Also
    $my_path = $_SERVER['DOCUMENT_ROOT']."/http://www.easttilburyinfantschool.com/recipts/";
    doesn't look ok to me either and probably should be:
    $my_path = "http://www.easttilburyinfantschool.com/recipts/";
    Forum Moderator
    BlueVoda Specialist

  10. #10
    Stroke.nz's Avatar
    Stroke.nz is offline The Man
    Join Date
    May 2005
    Location
    New Zealand
    Posts
    188

    Default

    I found a quicker way, Simon I have sent an email test to you.

  11. #11
    Maddog's Avatar
    Maddog is offline Lieutenant Colonel
    Join Date
    May 2005
    Location
    UK
    Posts
    514

    Default

    hi Pablo

    Still trying to sort this out....but no luck as yet

    <?php

    $emailBody = "Please find the recipe you or your friend requested from www.eastilburyinfantschool.com recipe attached:
    ";

    $attachment = "http://www.easttilburyinfantschool.com/recipts/recipte.html"
    <head>
    <title>The attached file</title>
    </head>
    <body>
    <h2>recipe attached</h2>
    </body>
    </html>"


    $boundary = uniqid( "");
    $headers = "From: web.master@easttilburyinfantschool.com"
    Content-type: multipart/mixed; boundary=\"$boundary\"";

    $emailBody = "--$boundary
    Content-type: text/plain; charset=iso-8859-1
    Content-transfer-encoding: 8bit

    $emailBody

    --$boundary
    Content-type: text/html; name=attachment.html
    Content-disposition: inline; filename=attachment.html
    Content-transfer-encoding: 8bit

    $attachment

    --$boundary--";

    mail( "web.master@easttilburyinfantschool.com", "The subject", $emailBody, $headers);
    ?>

    cut thing down to make is simple for me to understand, however getting the following error
    Parse error: parse error, unexpected '>' in /home2/easttilb/public_html/recipts/feedback2.php on line 7

    I think is I read any more on php I will go mad( if not mad already)
    www.bluevodaexchangelink.com
    BluevodaExchangeLink Help Center
    Bluevodaexchangelink Forum

    The only place for bluevoda site to be linked with!

  12. #12
    Maddog's Avatar
    Maddog is offline Lieutenant Colonel
    Join Date
    May 2005
    Location
    UK
    Posts
    514

    Default

    ps I know your very busy, any help to save me would be good!
    www.bluevodaexchangelink.com
    BluevodaExchangeLink Help Center
    Bluevodaexchangelink Forum

    The only place for bluevoda site to be linked with!

  13. #13
    Pablo is offline Moderator
    Join Date
    May 2005
    Posts
    507

    Default

    The code above has lots of syntax errors.
    All the PHP code should be between PHP tags, to seperate it from the normal HTML like this:

    <?PHP
    ...
    php code
    ...
    ?>

    It looks like you've just inserted the code in the HTML, in which case the PHP interpeter doesn't know what to do with it.
    Forum Moderator
    BlueVoda Specialist

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. How to create a registration page?
    By apoorvasheth in forum Microsoft Products
    Replies: 3
    Last Post: 10-05-2006, 09:10 AM
  2. How to create a registration page?
    By apoorvasheth in forum mySQL & PHP
    Replies: 6
    Last Post: 04-02-2006, 03:57 PM
  3. Urgent: Page Anchors
    By Gray in forum Adding Elements To Your Website
    Replies: 4
    Last Post: 11-25-2005, 04:43 PM
  4. Link Building in Light of VIsion-based Page Segmentation
    By VodaBot in forum eBusiness and Concept Development Talk
    Replies: 0
    Last Post: 11-17-2005, 09:57 PM
  5. How to create a registration page?
    By apoorvasheth in forum mySQL & PHP
    Replies: 2
    Last Post: 10-14-2005, 12:21 PM

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49