Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Forms Generation / Validation with mimemessage --M.Lemos
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=F
ormCaptureOutput([$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_mes
sage->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

Report this thread to moderator Post Follow-up to this message
Old Post
Upfront Technology
03-19-04 06:29 PM


Re: Forms Generation / Validation with mimemessage --M.Lemos
Hello,

On 03/18/2004 10:53 PM, Upfront Technology wrote:
> 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=F
ormCaptureOutput([$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_mes
sage->WrapText($va
ri
> able_to_hold_the_form_data_string),"",$text_part)

The forms are in HTML, so you should use the example of sending HTML
messages of the MIME message class. HTML messages should have an
alternative text part or else spam filters may reject your message. The
HTML mail example demonstrates how to compose and send a message with
both text and HTML alternative parts.

The text part should be created with CreateQuotedPrintableTextPart
function and the HTML part with CreateQuotedPrintableHTMLPart.

As text part you may just specify a text to warn users of plain text
only e-mail programs. As HTML part you speciy a string that has the HTML
of a page with the forms class output within it.

--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html

Report this thread to moderator Post Follow-up to this message
Old Post
Manuel Lemos
03-19-04 06:29 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Smarty Templates archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:56 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.