Link to home
Start Free TrialLog in
Avatar of Stef Merlijn
Stef MerlijnFlag for Netherlands

asked on

How to controle fonttype/layout in E-mail send by webpage form?

Hi,

On my website I have a Contact-form. On this form my cliënts can enter their name/adres/etc..
This information is currently send to me by mailto:
The text in this email is always send as Times New Roman and the layout is far from professional.

Is it possible to controle the fonttype of the email to be send?
Is there a way to controle the layout of the send E-mail. Maybe sending a HTML-email is an option?
How to compose this layout based on the information from the Contact-form?

Thank you for your help,
Stef
Avatar of Richard Quadling
Richard Quadling
Flag of United Kingdom of Great Britain and Northern Ireland image

Hi Delphiwizard,


If you supply just plain text then the rendering will depend upon the client reading the email. If they read it using a webmail viewer, then the font may be anything and at any size.

To send email as HTML you need to have the appropriate header.

I use PHP and have the following headers ...

MIME-Version: 1.0
Content-type: text/html; charset=iso-8859-1

Then my body/message is normal HTML


Regards,

Richard Quadling.
Avatar of Stef Merlijn

ASKER

But how do I add the entered information (on the contact-form) into a HTML layout? And send it by E-mail?
What code do you have to send the email at the moment.

Normally you have a mail function which requires From, To, Subject, Message.

You would normally also have AdditionalHeaders.

MIME-Version: 1.0
Content-type: text/html; charset=iso-8859-1

would be the additional headers.

They will need to be terminated with

CRLF
0x0D 0x0A
\r\n
chr(13) & chr(10)

sort of thing (hopefully one of those formats is meaningful to you).


On my HTML webpage I have a form with a submit-button.
To the form the following is added:
<form action="mailto:my@email.nl" method=POST enctype="text/plain" name="InfoAanvraag" style="font-family: Arial; font-size: 10pt">

On the form there are several fields that must be entered by the cliënt.
After pressing the submit-button, the content of the form must be send to my@email.nl
Ah. I see. There is no way to extend this mechanism as the emailing is done by the local client and NOT the server.

You have to use a server side script to construct the message (in html) with the appropriate headers.
As you are using FrontPage, does your server have FrontPage Extensions? If so, there is probably an extension you can use to do this. I don't know about them though, I use PHP.
I can use PHP, frontpage extensions, ASP, CGI, you name it.
So any solution would be perfect.
ASKER CERTIFIED SOLUTION
Avatar of Richard Quadling
Richard Quadling
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Can it be used on a windows-server?
PHP can be used in Apache, Sambar and even IIS (grin) and many other windows based web servers.

Then using phpmailer you will be able to generate html mime emails and send them.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I've asked my webhost for PHPMailer and ASPMail.
They will get back to me.
JMail I will check also.
FP extensions are server side aren't they?
Yes.
FrontPage Mail Extensions:

FrontPage mail extensions are used by FrontPage to be able to send mail directly from forms created by FrontPage's webbot component.


Ask them if they support this. This should mean you can configure it all in FrontPage.
>RQuadling
>>FP extensions are server side aren't they?

FPSE are not a server side language.  It is a program to help people use FP and make it easier to build a website.

You cannot configure the email that is sent using FP.  You have to use the components I suggested

-Corey
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASPEmail is installed on the server of my webhost, so that opens new possibilities.
I will do some testing with that.
Thank you all for your help.
You can check out their manual: http://www.aspemail.com/manual.html for coding example

-Corey