Forms Generation / Validation with mimemessage --M.Lemos
| From: | UpFront Technology | Date: | Fri, 19 Mar 2004 01:53:21 +0000 |
| Subject: | Forms Generation / Validation with mimemessage --M.Lemos | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-11148@lists.php.net to get a copy of this message | ||
Hello All,
I am using Forms Validation and MIME Message classes by M.Lemos. I can
successfully create and display the form, as well as successfully get the
MIME Message examples included in the documentation to work perfectly.
However, when trying the hack the Form code and the MIME code, I get a bit
lost.
Here is my problem:
referencing a past e-mail...
////////////////////////////////////////////////////////////////////////////
/////////////
On 02/16/2004 10:17 AM, Upfront Technology wrote:
> I am currently developing an online form using "HTML Forms generation and
> validation". I am quite fond of this class, but need to know if anyone
can
> either give an example or point me to example code that allows the form to
> e-mail the results to a desired recipient.
>
> I have read the documentation and noticed comments the suggest a point in
> the code where addition actions could be called, but no examples of mail
> were shown.
The examples of sending e-mail with Smarty are in another class for
sending e-mail:
http://www.phpclasses.org/mimemessage
For sending form via e-mail, just use the forms class output as text
string and feed to the e-mail class as in the example.
Keep in mind that you should disable the generation of Javascript in
e-mail messages or else your messages may get blocked by spam filters.
Most e-mail programs have Javascript support disabled by default for
security reasons.
////////////////////////////////////////////////////////////////////////////
/////////////
Now...
Could I get an example of "just use the forms class output as text
string and feed to the e-mail class"? I know this uses "FormCaptureOutput",
but I can't get the structure right.
something like:
$variable_to_hold_the_form_data_string=FormCaptureOutput([$not sure
here],array[not sure here]);
this (I believe) is then passed to the "CreateQuotedPrintableTextPart"
method (this code would replace $subscription->ReadOnly=1; in the forms
example):
/**********************/
<?
[required variables, etc]
$email_message->CreateQuotedPrintableTextPart($email_message->WrapText($vari
able_to_hold_the_form_data_string),"",$text_part)
/* Send the message checking for eventually acumulated errors */
$error=$email_message->Send();
if(strlen($error))
break;
?>
/**********************/
I could sure use some help.
Thanks So Much
Joe E.
UpFront Technology