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
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!
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
Hi Pablo
Simons talking about Building portable website's to send via email.
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!
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
thanks
www.bluevodaexchangelink.com
BluevodaExchangeLink Help Center
Bluevodaexchangelink Forum
The only place for bluevoda site to be linked with!
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!
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
I found a quicker way, Simon I have sent an email test to you.
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!
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!
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
There are currently 1 users browsing this thread. (0 members and 1 guests)